title: Redirect loop on wp-admin or wp-login.php
body: <p>I put together a quick WordPress site locally using MAMP, then checked it into an SVN repo. I then checked it out on to my development server.</p>
  
  <p>I didn't change anything except to run the <a href="http://interconnectit.com/products/search-and-replace-for-wordpress-databases/" rel="noreferrer">search and replace tool</a> script from Interconnectit to updated the URL of the site in the database on the server.</p>
  
  <p>Initially, I got a 500 server error. Checking the logs, I discovered that this "SoftException" was because <code>index.php</code> was writeable by group - the permissions were 664. No problem - a quick change of permissions to 644 sorted that. So now the frontside was working.</p>
  
  <p>However, strangely, the admin side of the site did not work. It just produced an endless redirect loop in all browsers.</p>
  
  <pre><code>Error 310 (net::ERR_TOO_MANY_REDIRECTS): There were too many redirects.
  </code></pre>
  
  <p>Nothing has changed since the local development version. The htaccess file is just a standard WordPress one. Nothing weird... still working fine locally.</p>
  
  <p>So what's going on?</p>