Blade Edge

Computer software | Video production | My life in general

Blade Edge about header

Help! Broken folder redirection in WordPress 3.1

February 24th, 2011 · 3 Comments · Personal

Update: I’ve changed my URL redirect to point to the default Blade Edge domain for now until I have more time to take this on after GDC, so the redirect loop isn’t reproducible anymore for the time being.

Any of my WordPress guru readers want to lend me a hand real quick? Here’s the deal – I auto-upgraded to WP 3.1 just a few minutes ago and upon trying to visit my MSEAirports site, which is the only one I’ve upgraded so far, I get the following error from Firefox:

The page isn’t redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

I have three domains on my server that point to three different WP installs. To maintain the root domain name when people visit the site I have an index.php file in my main web folder that contains the following code:

<?php
/* Short and sweet */
define('WP_USE_THEMES', true);

if ($_SERVER['SERVER_NAME'] == "www.blade-edge.com") {
   require('./blog/wp-blog-header.php');
   }
elseif ($_SERVER['SERVER_NAME'] == "www.mseairports.com") {
   require('./mseairports/wp-blog-header.php');
   }
elseif ($_SERVER['SERVER_NAME'] == "www.shrewsbury-gymnastics.com") {
   require('./shrewsburygym/wp-blog-header.php');
   }
?>

So with this code in place people can visit www.mseairports.com/index.php and not have the URL change to www.blade-edge.com/mseairports/index.php. (blade-edge.com is the default domain all my other domains/subdomains point to)

However you’ll find that the latter works just fine, while the former no longer functions as it used to under the previous version of WordPress (3.0.5 I believe it was).

I’ve checked the index.php file in the /mseairports directory and there’s no change to the file structure, it just defines the theme and loads the blog header file exactly as I’m doing in the root index.php. I replaced the require() function in the mseairpors.com if block with the require() function from shrewsbury-gymnastics.com if block and when you entered www.mseairports.com the Shrewsbury Gymnastics blog loaded up just fine.

Any ideas?

Tags: ··

3 Comments so far ↓

Leave a Comment