wordpress multisite>子目录> wp-admin无法打开

时间:2016-04-06 15:24:40

标签: wordpress .htaccess multisite

我有一个多站点系统正在运行。有一个子文件夹,一切都很完美。 Fronend位于domain.com/folder,后端位于domain.com/folder/wp-admin

但现在我需要domain.com/folder/en/,后端应该在domain.com/folder/en/wp-admin,但事实并非如此。我认为问题出在我的htaccess


    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /

    # Rule 1
    RewriteRule ^index\.php$ - [L]

    # Rule 2: uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)*files/(.+) wp-includes/ms-files.php?file=$2 [L]

    # Rule 3: add a trailing slash to "/wp-admin"
    # Note: This rule issues and redirect that will subsequently match Rule 5
    RewriteRule ^(([_0-9a-zA-Z-]+/)*)wp-admin$ $1wp-admin/ [R=301,L]

    # Rule 4: do nothing if URL is a file or directory
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]

    # Rule 5: strip preceeding path from wp-(content|admin|includes) paths
    RewriteRule ^([_0-9a-zA-Z-]+/)*(wp-(content|admin|includes).*) $2 [L]

    RewriteRule ^([_0-9a-zA-Z-]+/)*(.*\.php)$ $2 [L]

    RewriteRule . index.php [L]

有人知道这个问题以及如何解决它?

2 个答案:

答案 0 :(得分:0)

尝试在.htaccess文件中添加这些行。

RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain-name.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www.domain-name.com$
RewriteCond %{REQUEST_URI} !folder/
RewriteRule (.*) /folder/$1 [L]

答案 1 :(得分:0)

也许我错了,但实际上:

•您的网址是http(s):// mycustomurl /
•您是否尝试在“网络站点”页面配置中更改为http(s):// mycustomurl / en /

致谢