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?
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" .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.