admin管理员组文章数量:1122846
I have a subdirectory multisite setup, it all works fine apart from one small issue...
The sites are setup in the following structure:
/
/
/
You can access the admin panels if you use the following:
/
.php
.php
But if you use the following (as wordpress does in the dashboard), then it gives a redirect loop?
/
/
It seems there is some sort of redirect just when index.php is not specified on the subfolder installs, what is causing this?!
This multisite setup was setup in Wordpress 3.9.1 or before.
.htaccess
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
</IfModule>
# END WordPress
I have a subdirectory multisite setup, it all works fine apart from one small issue...
The sites are setup in the following structure:
http://domain.com/blogs/
http://domain.com/blogs/second/
http://domain.com/blogs/third/
You can access the admin panels if you use the following:
http://domain.com/blogs/wp-admin/
http://domain.com/blogs/second/wp-admin/index.php
http://domain.com/blogs/third/wp-admin/index.php
But if you use the following (as wordpress does in the dashboard), then it gives a redirect loop?
http://domain.com/blogs/second/wp-admin/
http://domain.com/blogs/third/wp-admin/
It seems there is some sort of redirect just when index.php is not specified on the subfolder installs, what is causing this?!
This multisite setup was setup in Wordpress 3.9.1 or before.
.htaccess
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
</IfModule>
# END WordPress
Share
Improve this question
asked Jan 27, 2015 at 9:40
DanDan
1013 bronze badges
3 Answers
Reset to default 0Not sure what caused this, a (hackish) fix that worked for me though:
RewriteRule ^blogs/([_0-9a-zA-Z-]+)/wp-admin/$ blogs/$1/wp-admin/index.php [L]
Your RewriteBase should be /blogs/
Normally when going through the network setup it will tell you what your .htaccess should do replacing all the previous WordPress rules.
instead of :
RewriteBase /
you should have:
RewriteBase /blogs/
p.s. where is that .htaccess
placed? in ROOT or in blogs
directory?
本文标签: Multisite wpadmin redirect loop
版权声明:本文标题:Multisite wp-admin redirect loop 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736294102a1929284.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论