我有以下网址 - website.com/ABCDETest+PHP,每次访问该网站时,我都会收到404 - 找不到文件或目录。 我的web.config是
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="Test" patternSyntax="Wildcard"> <match url="*"/> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/> </conditions> <action type="Rewrite" url="index.php"/> </rule> </rules> </rewrite> </system.webServer>有没有人碰巧知道为什么我得到404页面而且它没有重定向到index.php?
I have the following URL - website.com/ABCDETest+PHP, and every time I access the website I get 404 - File or directory not found. My web.config is
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="Test" patternSyntax="Wildcard"> <match url="*"/> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/> </conditions> <action type="Rewrite" url="index.php"/> </rule> </rules> </rewrite> </system.webServer>Does anyone happen to know why I am getting the 404 page and it is not redirecting to the index.php?
最满意答案
您可能收到HTTP错误404.11 - 未找到
这不是因为规则不起作用,而是因为与请求过滤模块拒绝请求的安全性相关。
请求过滤模块被配置为拒绝包含双转义序列的请求。
你必须做以下
IIS管理器 - >查找网站>转到请求过滤 - >编辑功能设置并启用设置“允许双重转义”。
You may be getting HTTP Error 404.11 - Not Found
This is not because the rule did not work but because of security related where request filtering module is denying the request.
The request filtering module is configured to deny a request that contains a double escape sequence.
You have to do following
IIS manager ->Find the Website >Go to the Request Filtering ->Edit Feature Settings and enable setting "Allow double escaping" .
更多推荐
webServer>,电脑培训,计算机培训,IT培训"/> <meta name="description&quo
发布评论