I'm going through some of the crawl errors on an MVC application I maintain, and found a 404 error for a URL that looked like it should be valid.
The URL is of the format: /gifts/{categoryName}/{productName}/{productId}/
For some reason, when the productName is set to the value "con" I just get a 404 error. Any other value (different or same length of string) and it seems to work fine.
Has anyone ever seen anything like this before?
con
is a reserved word and therefore cannot be put in an MVC route
You need to add the following to your web.config:
<configuration>
<system.web>
<httpRuntime relaxedUrlToFileSystemMapping="true"/>
<!-- ... your other settings ... -->
</system.web>
</configuration>
See this article for more information:
Putting the Con (COM1, LPT1, NUL, etc.) Back in your URLs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With