Log in

View Full Version : http.conf redirect www. traffic



keyboard
11-04-2014, 06:21 PM
Hey Everyone!

I have this little snippet

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

to redirect from
www.example.com/
to
example.com/

However it actually redirects to
example.com//

I remember having this issue in the past and adding a / into the regex to fix it, but I can't remember now.
Thanks,
Keebs