[SOLVED] Redirect when page is not found?


(Michael Sauer) #1

Good Morning,

I already used the search and asked Google, but I can’t find anything useful how to setup a redirect to the home page when a 404 error occurs. Does anybody know how to achieve this?

Kind regards,
Michael


(Daniel Lienert) #2

Hey Michael,

I would recommend to use the package MOC.NotFound, where you can specify the URL of the page that should be shown instead.

Cheers,
Daniel


(Michael Sauer) #3

Ah nice, thanks @daniellienert, works like a charm. :slight_smile:


(George Dimitriadis) #4

Hello Daniel,

thanks for your suggestion. Is there also a way to specify a page to load in case the 404 comes from the a page that is not accessible to the current user ?

Right now, if you try to access a page that is not accessible, 404 is thrown, I want to catch that case with a specific page.

#1430218623: The requested node does not exist or isn’t accessible to the current user”