views:

59

answers:

2

Thanks in advance to all you .htaccess guru's out there. I'm having an issue that's been bothering me for some time. I have wordpress nested inside my own site folder structure. To the user, everything is cool. But when i go to www.domain.com/blog/wp-admin, my credentials will not log in. It just keeps looping me around to the same page. If I go to www.domain.com/blog/wp-login.php directly it works. I wonder if anyone knows why this is.

The blog is located at /fe/blog/.

The .htaccess in / is:

Options +FollowSymlinks -Indexes
RewriteEngine on
RewriteRule ^(files)/?(.*) /files/$2 [NC,L]
RewriteRule ^(.*)           /fe/$1  [NC]

The .htaccess in /fe is:

Options +FollowSymlinks -Indexes
RewriteEngine on

And Finally the .htaccess in the /fe/blog/ is:

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

Any help would be greatly appreciated!

A: 

i wonder if this line is not the culprit:

RewriteRule ^(files)/?(.*) /files/$2 [NC,L]

could you try:

RewriteRule ^files/?(.*) /files/$1 [NC,L]

If not, you might also add the flag [QSA] (Query String Append)

RewriteRule ^files/?(.*) /files/$1 [NC,L, QSA]
pixeline
Thanks, but no luck on either. The files directory is next to the fe directory so don't think thats the issue. I added the QSA to fe redirect and that didn't work either. I think your onto something though because its the redirect that is messing up.For example. This is the link that will never work with my current setup. Has something to do with the redirect.http://www.duffyleadership.com/blog/wp-login.php?redirect_to=http%3A%2F%2Fwww.duffyleadership.com%2Ffe%2Fblog%2Fwp-admin%2F
Code Monkey
Just to clarify since it seemed confusing.... here is where that files directory is./files - files directory for rest of site, /fe - front end of site, /fe/blog - wordpress install
Code Monkey
If you remove () around 'files' in the RewriteRules, $2 must change to $1.
Dave W. Smith
Thank you Dave, i've corrected my solution accordingly.
pixeline
A: 

Try this in your /.htaccess file:

RewriteEngine on
RewriteRule !^(files|fe)/ fe%{REQUEST_URI} [NC]

And this in your /fe/blog/.htaccess file:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
Gumbo