|
Revision 2
(checked in by nperriault, 5 months ago)
|
First commit of the extracted code from production, I hope no passwd has been forgotten :-)
|
| Line | |
|---|
| 1 |
Options +FollowSymLinks +ExecCGI |
|---|
| 2 |
|
|---|
| 3 |
<IfModule mod_rewrite.c> |
|---|
| 4 |
RewriteEngine On |
|---|
| 5 |
RewriteBase / |
|---|
| 6 |
|
|---|
| 7 |
# we skip all files with .something |
|---|
| 8 |
RewriteCond %{REQUEST_URI} \.(css|js|png|gif|jpg)$ |
|---|
| 9 |
RewriteRule .* - [L] |
|---|
| 10 |
|
|---|
| 11 |
# remove trailing slash |
|---|
| 12 |
RewriteCond %{REQUEST_FILENAME} !-d |
|---|
| 13 |
RewriteCond %{REQUEST_URI} ^(.*)/$ |
|---|
| 14 |
RewriteRule ^(.*)/$ $1 [R=301,L] |
|---|
| 15 |
|
|---|
| 16 |
# we check if the .html version is here (caching) |
|---|
| 17 |
RewriteRule ^$ index.html [QSA] |
|---|
| 18 |
RewriteRule ^([^.]+)$ $1.html [QSA] |
|---|
| 19 |
RewriteCond %{REQUEST_FILENAME} !-f |
|---|
| 20 |
|
|---|
| 21 |
# no, so we redirect to our front web controller |
|---|
| 22 |
RewriteRule ^(.*)$ index.php [QSA,L] |
|---|
| 23 |
</IfModule> |
|---|
| 24 |
|
|---|
| 25 |
# big crash from our front web controller |
|---|
| 26 |
ErrorDocument 500 "<h2>Application error</h2>symfony application failed to start properly" |
|---|