无法访问是因为道preSS我的文件夹 [英] Can't access my folder because of WordPress
问题描述
我已经安装了的Word preSS上我的网站,我使用永久链接,但我有一个名为x在我的网站的主要根源,现在当我输入我无法访问文件夹 HTTP:// mywebsite / X
它重定向我错误404未找到。这是因为Word preSS试图誉称,名为x在数据库中的故事。我怎样才能排除文件夹及其子女从wrod preSS计算文件夹?
I have installed my WordPress on my website and I'm using permalinks, but I have a folder called x in the main root of my website I can't access it now when I type http://mywebsite/x
it redirects me to error 404 not found. That's because WordPress is trying to fitch the story that called x in the database. How can I exclude that folder and its childern "folders" from wrodpress calculations?
推荐答案
在您的网站的根目录下的的.htaccess
文件包含一个重写规则,它把每一个进来的请求字preSS的引导程序。它可能看起来是这样的:
The .htaccess
file in the root of your website's directory contains a RewriteRule which redirects every incoming request to Wordpress's bootstrapper. It probably looks something like this:
RewriteRule ^(.+)$ index.php?$1 [QSA,L]
您应该增加两个条件,以本规则。这些条件为例外确保只执行的规则,如果没有(!
)的文件(-f <$ C C $>)或者没有目录( -d
)提供相匹配的请求的URL:
You should add two Conditions to this Rule. These conditions provide exceptions that make sure the Rule is only executed if there is no (!
) file (-f
) or no directory (-d
) available that matches the requested URL:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?$1 [QSA,L]
这是应该做的伎俩。
这篇关于无法访问是因为道preSS我的文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!