2010-01-09 87 views
0

在此先感謝所有.htaccess大師的出現。我遇到了困擾我一段時間的問題。我有wordpress嵌套在我自己的網站文件夾結構。對用戶來說,一切都很酷。但是當我去www.domain.com/blog/wp-admin時,我的憑證不會登錄。它只是讓我循環到同一頁面。如果我直接訪問www.domain.com/blog/wp-login.php,它可以工作。我想知道是否有人知道這是爲什麼。WordPress的.htaccess錯誤

博客位於/ fe/blog /。

中/中的.htaccess是:

Options +FollowSymlinks -Indexes 
RewriteEngine on 
RewriteRule ^(files)/?(.*) /files/$2 [NC,L] 
RewriteRule ^(.*)   /fe/$1 [NC] 

中/ FE中的.htaccess是:

Options +FollowSymlinks -Indexes 
RewriteEngine on 

終於在/ FE /博客的.htaccess /是:

# BEGIN WordPress 
<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteBase /blog/ 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule . /blog/index.php [L] 
</IfModule> 

任何幫助將不勝感激!

回答

0

/.htaccess文件試試這個:

RewriteEngine on 
RewriteRule !^(files|fe)/ fe%{REQUEST_URI} [NC] 

這在/fe/blog/.htaccess文件:

RewriteEngine On 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule . index.php [L] 
0

不知這行是不是罪魁禍首:

RewriteRule ^(files)/?(.*) /files/$2 [NC,L] 

可以嘗試:

RewriteRule ^files/?(.*) /files/$1 [NC,L] 

如果沒有,你還可以添加標誌[QSA(查詢字符串追加)

RewriteRule ^files/?(.*) /files/$1 [NC,L, QSA] 
+0

謝謝,但在任沒有運氣。文件目錄在fe目錄旁邊,所以不要認爲這是問題。我將QSA添加到了fe重定向中,但這也不起作用。我認爲你的東西,因爲它的重定向搞亂了。例如, 。這是我的當前設置無法使用的鏈接。與重定向有關。 http://www.duffyleadership.com/blog/wp-login.php?redirect_to=http%3A%2F%2Fwww.duffyleadership.com%2Ffe%2Fblog%2Fwp-admin%2F – 2010-01-09 15:02:27

+0

只是爲了澄清,因爲它似乎令人困惑......這裏是文件目錄的位置。 /files - 其餘站點的文件目錄, /fe - 站點前端, /fe/blog - wordpress install – 2010-01-09 15:05:36

+1

如果您在RewriteRules中移除(')'文件,$ 2必須更改爲$ 1。 – 2010-01-09 16:45:12