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