SuperBlackHat
Power Member
- Feb 2, 2009
- 578
- 117
I want to make www.mydomain.com redirect to http://mydomain.com. Does anyone know how to do this properly? I tried:
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.mydomain.com$
RewriteRule ^(.*)$ http://mydomain.com [R=301,L]
The browser told me:
Too many redirects occurred trying to open "http://mydomain.com/". This might occur if you open a page that is redirected to open another page which then is redirected to open the original page.
Does anyone know the right code to use?
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.mydomain.com$
RewriteRule ^(.*)$ http://mydomain.com [R=301,L]
The browser told me:
Too many redirects occurred trying to open "http://mydomain.com/". This might occur if you open a page that is redirected to open another page which then is redirected to open the original page.
Does anyone know the right code to use?
Last edited: