Thanks guys, I already have a 404 page set-up, however it's redirecting to it from a macro that I was enquiring about, as it wouldn't have a 404 status code by default?
I figure I'll unpublish the page then redirect so that next time, it's all handled by umbraco.
Best way to redirect to a 404 page
Hi there,
I was wondering what the best way to return the 404 page would be when my criteria is met instead of rendering the current page.
Thanks,
Jordan.
Hi Jordan,
The best way is to set error esction in UmbracoSettings.config
<errors>
<!-- the id of the page that should be shown if the page is not found -->
<!--<error404>
<errorPage culture="default">1</errorPage>
<errorPage culture="en-US">200</errorPage>
</error404>-->
<error404>
<errorPage culture="en-US">1398</errorPage>
<errorPage culture="sv-SE">1399</errorPage>
</error404>
</errors>
Thanks,
Alex
This topic has some good solutions: http://our.umbraco.org/forum/developers/extending-umbraco/43866-Alternatives-to-404-in-umbracosettingsconfig
Also read this blog: http://creativewebspecialist.co.uk/2013/08/07/the-new-way-to-do-a-404-umbraco-handler/
Jeroen
Thanks guys, I already have a 404 page set-up, however it's redirecting to it from a macro that I was enquiring about, as it wouldn't have a 404 status code by default?
I figure I'll unpublish the page then redirect so that next time, it's all handled by umbraco.
is working on a reply...