On a newly managed domain, I ran across a redirect loop immediately after adding the domain in the Dreamhost panel.
Chrome would complain:
This webpage has a redirect loop
With the following error:
Error 310 (net::ERR_TOO_MANY_REDIRECTS): There were too many redirects.
The problem is Dreamhost's homebrewed method for removing "www" from the domain.
To solve the problem, edit the domain and check:
Leave it alone: Both http://www.foo.com/ and http://foo.com/ will work
Then add the following to an .htaccess file at the domain root directory:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
source for the .htaccess file
prev page