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

1 Answer 1



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

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

  • Agree - the RewriteBase is re-inserted to the request after substitution. Sep 8, 2011 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, 2011 at 21:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .