Extension less URLs and custom error pages

From AbleCommerce Wiki
Revision as of 06:42, 24 August 2016 by Mazhar (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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
    <httpErrors errorMode="Custom">
      <remove statusCode="404" subStatusCode="-1" />
      <error statusCode="404" subStatusCode="-1" path="/Errors/PageNotFound.aspx" responseMode="ExecuteURL" />
    </httpErrors>
  <pre>