Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Would somebody mind postulating and possible reasons why their is an automated redirect on my homepage that adds /admin to the URL.

Please visit www.divethegap.com/update. You will see that it instantly redirects to /admin and does not load the page. There is a folder called admin that is not accessible to a user, but their is no redirect to it anywhere on the site.

What is going on. I have removed all recent function additions in the theme and unistalled plugins. There are several include-template-paths that I use but I don't use any redirects.

What has caused this.

Any ideas?

Marvellous

HT ACCESS //

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /update/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /update/index.php [L]
</IfModule>

# END WordPress
share|improve this question
    
Can you post the contents of your .htaccess file? Also, knowing your current permalink structure would help. –  EAMann Mar 22 '11 at 15:30
    
HT Access edited above –  Robin I Knight Mar 22 '11 at 15:35
    
Can you please stop ending every question you ask with "Marvellous" ? –  anu Mar 22 '11 at 15:37
    
You've definitely got some redirect weirdness going on - even accessing divethegap.com/admin raises a redirect loop error. Do you have any plugins / code designed to handle a 404 error? –  anu Mar 22 '11 at 15:42
    
Nothing. And although I have been tinkering with a front end admin error none of it users redirects, only include paths and I just erased all of them to see if that would stop this . Nothing. –  Robin I Knight Mar 22 '11 at 15:49

3 Answers 3

If the redirect comes from WordPress code, you can find out who is calling wp_redirect() by hooking into it:

add_filter( 'wp_redirect', 'wpse12721_wp_redirect' );
function wpse12721_wp_redirect( $location )
{
    // Get a backtrace of who called us
    debug_print_backtrace();
    // Cancel the redirect
    return false;
}
share|improve this answer

Just some days ago I've written a blog post that shows an easy way How to Debug Redirect Problems in WordPress:

You will then get information of the redirect URL, automatic redirects are disabled and you find a backtrace to see what caused the redirect (file + line).

share|improve this answer
up vote 0 down vote accepted

By a process of elimination we have determined that the error was caused by the plugin REDIRECTION.

This plugin has now been removed.

I must point out that it was never used and certainly never set up to carry out that action. I can only imagine that somehow the creation of themed files must have had similar names to the plugins files. After checking the plugin file names that is also not the case.

This remains a mystery. It was only through trial and error that we determined that it was this plugin causing the problem.

If anyone has any theories I would like to hear them.

Case closed

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.