Jump to content

pagefileSecure error handling


Hurme
 Share

Recommended Posts

Hello,

pagefileSecure works wonders, but how can I catch the error message and replace it with something more human instead of the "Internal Server Error" that pops up? Best scenario for me, would be to redirect the user on another page instead.

Link to comment
Share on other sites

21 hours ago, Hurme said:

instead of the "Internal Server Error" that pops up

"Internal Server Error" or "Page Not Found"? The latter is what you should be seeing for inaccessible files, and that's the correct thing for ProcessWire to do according to HTTP standards. If you see an internal server error (status code 5xx), something's wrong.

For a "Page Not Found" error, PW renders the "404 Not Found" page under "Home" unless you have configured a different page as $config->http404PageID in site/config.php. You can create your own error page template and change to that in the page properties to adapt the output and make it more dynamic.

 

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...