Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a strange Apache/WordPress redirect loop that I can't seem to figure out.

Here is the relevant logs and other info: http://pastebin.com/E1afW2vw

It seems that the page request gets made, and it tries to redirect to the proper directory based on the Alias given in the httpd.conf file. But when it tries to replace back the given URL, it fails to recognize that the directory is an alias and doubles up the base directory (/blog/blog/).

Any ideas what might be causing this? And how to fix it?

Also... the .htaccess file is located in the root of the /wp directory that is aliased to /blog

share|improve this question

1 Answer 1

up vote 3 down vote accepted

Try:

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

(Remove /blog/ from RewriteRule . /blog/index.php [L])

share|improve this answer
    
Agree - the RewriteBase is re-inserted to the request after substitution. –  Shane Madden Sep 8 '11 at 21:33
    
I tried that, and it seemed to work. But because WordPress automatically created those rules, and I figure that the people at WP knew more about it than I did, that it was my settings that was doing something wrong. I also didn't want the site to break when the client went through and decided to click the "Update Permalinks" button and revert the rules. So I was looking for a different answer that didn't break the WordPress created rules. But thank you for confirming my solution. –  Benjam Sep 8 '11 at 21:35

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.