apache rewrite rule to add www
I've added a rule to force www in front of my domain name:
browsing to mysite.fr redirects to www.mysite.fr//
why does it add two slashes at the end of the URL ?
Here's my full rewrite rules set:
<IfModule mod_rewrite.c>
RewriteEngine On
Rewritecond %{HTTP_HOST} !^www\.mysite\.fr
RewriteRule (.*) http://www.mysite.fr/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule .? - [L]
RewriteRule ^/css(/|$) - [L,NC]
RewriteRule ^/img(/|$) - [L,NC]
RewriteRule ^/js(/|$) - [L,NC]
# Rewrite all other queries to the front controller.
RewriteRule .? %{ENV:BASE}/app.php [L]
</IfModule>
 
No comments:
Post a Comment