Tuesday, 7 April 2015

Kentico Custom 404 Page Not Found

Even after specifying page not found as following, this page doesn’t show. You'll always get redirected to the /home.aspx page.


<customErrors defaultRedirect="~/Error.aspx" mode="RemoteOnly">
      <!--<error statusCode="404" redirect="~/CMSPages/handler404.aspx"/>-->
      <error statusCode="404" redirect="~/CMSMessages/PageNotFound.aspx" />
    </customErrors>

Fix:

http://devnet.kentico.com/docs/7_0/devguide/index.html?configuring_custom_error_pages.htm