2011-08-04 80 views
0
/custom/player-registration.php 

我在我的WordPress安裝中使用了以下.htaccess,並且我無法訪問上述URL ...任何提示?我在這裏嘗試了2種方法... URL繼續進入WordPress搜索頁面。無法通過.htaccess在WordPress安裝中忽略一個目錄

# BEGIN WordPress 
<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteBase/
RewriteRule ^custom - [L,NC] 
RewriteCond %{REQUEST_URI} !^/(custom|custom/.*)$ 
RewriteRule ^index\.php$ - [L] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule . /index.php [L] 
</IfModule> 
# END WordPress 

UPDATE

我想我需要澄清的是,我能夠訪問/自定義的,但我不能到該目錄中訪問文件...我怎麼訪問該目錄中的文件?

回答

0

默認WP的.htaccess:

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

意味着:如果請求不指向任何現有的文件或目錄,使用的index.php

因此,它應該爲你的文件,以及使用默認設置。你試圖與你的文件的其餘部分一致嗎?

+0

事情是......它指向現有的文件 – Webnet

0

嘗試

# BEGIN WordPress 
<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteBase/

RewriteCond %{REQUEST_URI} ^custom.* 
RewriteRule ^(.*)$ /index.php?/$1 [L] 

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule . /index.php [L] 
</IfModule> 
# END WordPress 
相關問題