Beware this content is over 6 years old and considered stale. It may no longer be accurate and/or reflect the understanding of the author but remains here for reference only. Please keep this in mind as you use this content.

Today we stumpled accross a strange bug in WordPress v3.1, which at the time (of typing) is they the most recent version of WordPress.

The problem was that we had a never ending redirect loop on the homepage after upgrading from WordPress 3.0 to 3.1.

The hosting environment seems be the cause of the issue as after the upgrading on a local development environment which is effectively a WAMP stack (Windows XP running Apache etc.), there were no visible problems.

When making these changes to the live site, there would be a never ending redirect loop.

The production environment is a Windows Server 2003 (R2 Standard x64 Edition) running IIS6 with an ISAPI filter called WordPress URL Rewrite (v1.0) which gives us search engine friendly (SEF) URLs on IIS.

We eventually stumbled upon this thread in the WordPress forums:
Windows server infinite redirect after upgrading to 3.1

At the moment there is no clear solution other than to disable the redirecting feature which appears to be the canonical redirect feature. The ISAPI filter must interfere with this process causing the perpetual redirecting.

A simple fix, you can add the following snippet to disable the canonical URL redirect features of WordPress 2.3 and above. All credit to Mark Jaquith (@markjaquith) for coming up the original idea.

If you have a custom theme, the best place for this snippet would be at the top of your functions.php so that you can remove it once WordPress releases an update that fixes this issue.

If you are really lazy or not sure what your doing, there is a WordPress plugin by Nick Schalk and Chris Cheney that will pretty much do this for you. You can grab it here: Permalink Fix & Disable Canonical Redirects Pack

Keep in mind that this fix worked for the environment we experienced this problem on, but it may be relevant if have a similar setup and you are seeing a similar issue.

If you have come across a better solution, please do let us know.