编辑htaccess文件后,我的wordpress网站出现问题。
这是我从浏览器获得的错误:
ERR_TOO_MANY_REDIRECTS
我认为它的重定向无限循环。这是我的.htaccess文件,有人可以帮忙吗?
RewriteEngine on
# BEGIN WordPress
RewriteBase /
# uploaded files
# add a trailing slash to /wp-admin
# END WordPress
rewriterule ^index\.php$ - [L]
rewriterule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
rewriterule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin [R=301,L]
rewritecond %{REQUEST_FILENAME} -f [OR]
rewritecond %{REQUEST_FILENAME} -d
rewriterule ^ - [L]
rewriterule . index.php [L]
答案 0 :(得分:0)
不确定您要对此规则做什么,但这不会导致重定向循环:
rewriterule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin [R=301,L]
原始请求:/ foo / wp-admin
foo/wp-admin
^([_0-9a-zA-Z-]+/)?wp-admin$
,后引用$ 1 = foo/
foo/wp-admin
foo/wp-admin