Use error-handling page templates to provide contextual help or links to existing content for website errors. Optimizely Configured Commerce provides three standard error-handling pages:
- 403: Unauthorized Access – The user does not have permission to view the requested file or resource.
- 404: Page Not Found – The page or file cannot be found or does not exist.
- 500: Unhandled Error (HTTP 500 error) – Generic error suggesting a problem with the website's server.
Customize the pages
- Click View Websites in the Admin Console.
- Toggle the Content Editor button to On, and select the website to view.
- Click the Edit icon in the Content Editor.
- Select the error page to edit.
- Enter the desired content into the appropriate field. For instance, you could update the Page Title from Page Not Found to Page No Longer Exists.
- Scroll down and click Save.
- Click Publish to approve the new content and publish it to the website.
Troubleshoot
If the web.config file is not set correctly, the error handling pages may not return as expected or users may see a generic IIS error page. The example below shows the proper mapping to ensure the correct page returns:
<customErrors mode="RemoteOnly" defaultRedirect="/Error"> <error statusCode="403" redirect="/Error?ErrorCode=403" /> <error statusCode="404" redirect="/Error?ErrorCode=404" /> <error statusCode="500" redirect="/Error?ErrorCode=500" /> </customErrors>
Please sign in to leave a comment.