2016-04-06 79 views
0

我有一個多站點系統正在運行。有了一個子文件夾,一切都很完美。 Fronend在domain.com/folder和後端在domain.com/folder/wp-adminwordpress多站點>子目錄> 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] 

有人知道這個問題,以及如何解決它?

回答

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

這不會改變我的情況。 如果我輸入:https://domain.com/site-one/wp-admin/站點一的後端打開 - 一切正常。 如果我輸入:https://domain.com/site-two/sub/wp-admin/主站點的後端(與https://domain.com/site-one/wp-admin/相同)打開。這是錯誤的。 在fronend我也有一個錯誤。 https://domain.com/site-two/sub/返回404。 –

相關問題