Wordpress安裝時使用重寫將所有請求重定向到默認情況下index.php。如果服務器上有其他dirs或文件,則必須在.htaccess規則中考慮它們。
修改您的.htaccess。以下是繞過您的憑證目錄的wordpress規則的示例規則。
#only allow the wordpress rules if it is not request /voucher.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_URI} !^/voucher [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
或者你可以這樣做你的規則。
#if the request is for the voucher folder, do nothing and display the page
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/voucher [NC]
RewriteRule^- [L]
# BEGIN WordPress
RewriteBase/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
</IfModule>
無論是網站名稱還是屏幕截圖在這裏都有幫助 –
理想情況下,該文件夾應顯示頁面。我認爲.htaccess有規則將所有請求重定向到根目錄。 –
http://pastebin.com/EewebbZd其我的.htaccess – Lukas