Difference between revisions of "Extension less URLs and custom error pages"
From AbleCommerce Wiki
(No difference)
|
Latest revision as of 06:50, 24 August 2016
If you are using extensionless URLs for your products or webpages you may notice that custom 404 error page may not be working for a missing extension less URL. In order make custom error pages work with extension less URLs in gold you will have add an extra piece of configuration. Following is a step by step guide about enabling custom error pages while using extension less URLs.
- Edit your Website/web.config file
- Locate following element
<system.webServer>
- Add following configurations under system.webServer element
<httpErrors errorMode="Custom"> <remove statusCode="404" subStatusCode="-1" /> <error statusCode="404" subStatusCode="-1" path="/Errors/PageNotFound.aspx" responseMode="ExecuteURL" /> </httpErrors>
- If your install is running under Virtual Directory/Application for example yourstore.com/shop then make sure you have path prefixed with Virtual Directory/Application name. For example for /shop it should look like following
<httpErrors errorMode="Custom"> <remove statusCode="404" subStatusCode="-1" /> <error statusCode="404" subStatusCode="-1" path="Shop/Errors/PageNotFound.aspx" responseMode="ExecuteURL" /> </httpErrors>
- Save web.config file and now custom 404 error page should appear for missing extension less URLs.