Stuck in 301 redirect loop after URL change?

rated by 0 users
Answered (Verified) This post has 1 verified answer | 2 Replies | 2 Followers

Not Ranked
40 Posts
Points 680
Brian Madden posted on Tue, Oct 14 2008 9:31 PM

Hi Everyone,

I'm getting ready to take our CS 2008 site live. I've been doing all the development work with a fake domain, like v4.mycompany.com. When we go live, I'm planning on using www.mycompany.com. For test / dev purposes, the site URL in the control panel was configured as v4.

Today I wanted to test the cutover, so I just modified the hosts file on my laptop to point www.mycompany.com to the IP of the test server. I flushed DNS and can ping the server no prob. But when I type "www.mycompany.com" into the web browser, it gets stuck in a redirect loop between "www.mycompany.com" and "mycompany.com."

If I look at the IIS logs, I can see these are all 301 redirections.

For troubleshooting purposes, I created a "v5.mycompany.com" address in DNS and pointed that to the same site. That works no prob. I also created a "v6.mycompany.com" entry in the hosts file, and THAT works no prob. It's only the www that doesn't work?!?

Finally, I created a brand new site in IIS, and bound it to the same IP as the CS2008 site. (Of course I had to stop the old site first.) If I point the source of this site to my CS web root folder, I get the exact same problem. (i.e. v4, v5, and v6 URLs work fine, www gets stuck in the 301 loop.) If I go in and change the properties of that new test site and point it to another home folder on IIS, then it works fine.

So I've determined this issue is ONLY experienced with www.mysite.com, and when accessing the CS2008 application.

Does anyone have any ideas what I could try next? I've been at this for hours and I'm completely stumped.

CS 2008, SP-1, Windows 2008, IIS 7, SQL 2005.

Thanks,
Brian

  • | Post Points: 20

Answered (Verified) Verified Answer

Top 10 Contributor
4,034 Posts
Points 61,125
TelligentSupportTeam
Verified by Brian Madden

For SEO purposes, by default CS removes the www. so that your content is only on one domain as opposed to being spread out over two.  For details on changing this so CS instead Requires www. (or ignores it), see http://docs.communityserver.com/general-topics/preventing-community-server-from-removing-www-from-url/ .

  • | Post Points: 40

All Replies

Top 10 Contributor
4,034 Posts
Points 61,125
TelligentSupportTeam
Verified by Brian Madden

For SEO purposes, by default CS removes the www. so that your content is only on one domain as opposed to being spread out over two.  For details on changing this so CS instead Requires www. (or ignores it), see http://docs.communityserver.com/general-topics/preventing-community-server-from-removing-www-from-url/ .

  • | Post Points: 40
Not Ranked
40 Posts
Points 680

Yep! That did it! I had configured the site to remove the "www" when I was using the "v4" subdomain. Then for SEO purposes, I configured IIS so that it would automatically forward non-www to the www. So IIS and CS were just looping.

Thanks again!

  • | Post Points: 5
Page 1 of 1 (3 items) | RSS
Powered by Community Server (Commercial Edition), by Telligent Systems

Copyright© 2008 Telligent Systems Inc. All rights reserved
CommunityServer.com  •  Telligent.com