Monday, July 27, 2015

Sitecore and custom 404 not found and custom error pages

In Sitecore if an page or other media asset is not found, the user is redirected to the default 404 page.
If you wish to show a custom page instead, there are settings which can be configured in the web.config file. Under the "/configuration/sitecore/settings/setting" element there are two settings which control the behavior of the 404 page:

  • ItemNotFoundUrl - When a URL does not correspond to: a content item or Sitecore media item.
  • LinkItemNotFound - When a link inside a rich text field does not exist, the URL is replaced with this value.
  • LayoutNotFoundUrl - For items which does exist but which has not been assigned a layout.
  • ErrorPage - For any general errors in Sitecore.

No comments:

Post a Comment