2017-04-08 138 views
0

嗨,我有一個wordpress網站,我想在根目錄下創建一個自定義文件夾,這個文件夾將與wordpress無關。我必須使用什麼重寫規則才能訪問該文件夾? 我已經把在wordpress安裝中創建自定義文件夾

RewriteRule ^clients? /clients/index.php [L] 

當前htaccess文件

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

# END WordPress 

當我訪問該文件夾中我得到一個內部服務器錯誤500

回答

0

你必須有一個無限循環重寫,看到this answer。試試這個:

... 
RewriteBase/
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteRule ^clients? /clients/index.php [L] 
... 

完美,你可能要添加的QSANC標誌以及。

+0

現在我在我的wordpress中遇到錯誤404頁面,因爲我正在嘗試訪問我的wordpress網站中的一個頁面。 –

相關問題