1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| Options +FollowSymLinks +ExecCGI
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^monsite.fr [NC]
RewriteRule (.*) http://www.monsite.fr/$1 [QSA,R=301,L]
Redirect permanent /index.html http://www.monsite.fr/
Redirect permanent /categorie1/index.html http://www.monsite.fr/categorie1/
# uncomment the following line, if you are having trouble
# getting no_script_name to work
#RewriteBase /
# we skip all files with .something
# comment the following 3 lines to allow periods in routes
RewriteCond %{REQUEST_URI} \..+$
RewriteCond %{REQUEST_URI} !\.html$
RewriteRule .* - [L]
# we check if the .html version is here (caching)
RewriteRule ^$ /index.html [QSA]
RewriteRule ^([^.]+)$ /$1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
# no, so we redirect to our front web controller
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
# big crash from our front web controller
ErrorDocument 500 "<h2>Application error</h2>symfony application failed to start properly" |
Partager