Skip to content
Newer
Older
100755 33 lines (27 sloc) 1.21 KB
38eeca0 @kolber Updated app to v2
authored
1 RewriteEngine on
2
3 # Some hosts require a rewritebase rule, if so, uncomment the RewriteBase line below. If you are running from a subdirectory, your rewritebase should match the name of the path to where stacey is stored.
4 # ie. if in a folder named 'stacey', RewriteBase /stacey
5 #RewriteBase /
6
7 ErrorDocument 404 /404.html
8
9 # Rewrite any calls to *.html, *.json, *.xml, *.atom, *.rss, *.rdf or *.txt if a folder matching * exists
10 RewriteCond %{REQUEST_FILENAME} !-f
11 RewriteCond %{REQUEST_URI} !public/
12 RewriteCond %{DOCUMENT_ROOT}/public/$1.$2 !-f
13 RewriteRule (.+)\.(html|json|xml|atom|rss|rdf|txt)$ $1/ [L]
14
15 # Add a trailing slash to directories
16 RewriteCond %{REQUEST_FILENAME} !-f
17 RewriteCond %{REQUEST_FILENAME} !-d
18 RewriteCond %{REQUEST_URI} !(\.)
19 RewriteCond %{REQUEST_URI} !(.*)/$
20 RewriteRule ([^/]+)$ $1/ [L]
21
22 # Rewrite any calls to /* or /app to the index.php file
23 RewriteCond %{REQUEST_URI} /app/$
24 RewriteRule ^app/ index.php [L]
25 RewriteCond %{REQUEST_FILENAME} !-f
26 RewriteCond %{REQUEST_FILENAME} !-d
27 RewriteRule ^(.*)/$ index.php?$1 [L]
28
29 # Rewrite any file calls to the public directory
30 RewriteCond %{REQUEST_FILENAME} !-f
31 RewriteCond %{REQUEST_FILENAME} !-d
32 RewriteCond %{REQUEST_URI} !public/
33 RewriteRule ^(.+)$ public/$1 [L]
Something went wrong with that request. Please try again.