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]
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:
check .htaccess file, that could be a problem. (redirection if page does not exist, in your case, http://mywebsite/x/index.html or .php does not exist)
发布评论
评论(2)
网站根目录中的
.htaccess
文件包含一个 RewriteRule,它将每个传入请求重定向到 Wordpress 的引导程序。它可能看起来像这样:您应该向此规则添加两个条件。这些条件提供了例外情况,确保仅在没有 (
!
) 文件 (-f
) 或没有目录 (-d
) 时才执行规则>) 与所请求的 URL 匹配的可用:这应该可以解决问题。
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: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:That should do the trick.
检查 .htaccess 文件,这可能是个问题。 (如果页面不存在,则重定向,在您的情况下, http://mywebsite/x/index.html或 .php 不存在)
check .htaccess file, that could be a problem. (redirection if page does not exist, in your case, http://mywebsite/x/index.html or .php does not exist)