2017-04-08 99 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网站中的一个页面。 –

相关问题