开发者

Wordpress .htaccess errors

开发者 https://www.devze.com 2022-12-15 18:35 出处:网络
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, everythin

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>
Rewr开发者_StackOverflow中文版iteEngine On
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>

Any help would be greatly appreciated!


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]


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]
0

精彩评论

暂无评论...
验证码 换一张
取 消