2016-04-06 15 views
0

Çalıştığım çok siteli bir sistem var. Bir alt klasörle her şey mükemmel çalışır. Fronend domain.com/folder/wp-adminwordpress multisite> alt-alt dizin> wp-admin açılamıyor

de domain.com/folder ve arka uçta yer almaktadır Ama şimdi domain.com/folder/en/ ihtiyaç ve arka uç domain.com/folder/en/wp-admin olmalıdır ama öyle değil. Sorun benim htaccess'umda bir yerlerde olduğunu düşünüyorum.

 

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

Birisi bu sorunu ve nasıl çözüleceğini biliyor mu?

cevap

0

Bu satırları .htaccess dosyanıza eklemeyi deneyin.

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

Bu, benim durumumda hiçbir şey değişmez. Eğer girersem: https://domain.com/site-one/wp-admin/ site-one'ın arka ucu açılır - her şey mükemmel çalışır. Girerseniz: https://domain.com/site-two/sub/wp-admin/ ana sitenin arka ucu (https://domain.com/site-one/wp-admin/ gibi) açılır. Bu yanlış. Cephede de bir hata var. https://domain.com/site-two/sub/, 404 değerini döndürür. –