Sitecore keep or preserve url when 404 page not found

In some cases we don't want to redirect the users to a 404 page only because the users typed in the url wrongly. In this case what we want is to show the 404 content but keep or preserve the url. This way they can correct the url without having to type it in from scratch.

The way to do this in Sitecore is to execute some code before the OOTB RedirectOnItemNotFound code.

Create a config patch:


And that's it.

HTH,
Andreas

Post a Comment