Difference between revisions of "404 Custom Error Pages"

From AbleCommerce Wiki
Jump to: navigation, search
(New page: '''Question''' How to create custom 404 error page? '''Solution''' *First Create a folder let say ''ErrorPages'' at the root of the site *Add two ASPX pages let say ''Default.aspx'' an...)
 
 
(One intermediate revision by the same user not shown)
Line 20: Line 20:
 
</pre>
 
</pre>
 
</code>
 
</code>
 +
 +
[[Category:AbleCommerce 7]]
 +
[[Category:AbleCommerce Gold]]

Latest revision as of 11:00, 15 August 2013

Question

How to create custom 404 error page?

Solution

  • First Create a folder let say ErrorPages at the root of the site
  • Add two ASPX pages let say Default.aspx and FileNotFound.aspx in this newly created ErrorPages folder.
  • Specify the contents of the pages as per your requirments.
  • Edit the web.config file and locate the <customErrors mode="Off" /> tag and make it look like as bellow

    <customErrors mode="On" defaultRedirect="~/ErrorPages/Default.aspx">
      <error statusCode="404" redirect="~/ErrorPages/FileNotFound.aspx"/>
    </customErrors>