Jump to content

Logging 404 errors


JoshoB
 Share

Recommended Posts

Greetings! I have what I hope is a simple question. How do I retrieve the original URL when ProcessWire throws a 404 Error? Specifically, I want to log which URLs lead to a 404, but at present it seems that URLs that cannot be found are redirected to the 404 page behind the scenes, with no obvious way (for me) to retrieve the URL that the user originally requested.

Thanks in advance!

Link to comment
Share on other sites

don't know if you can find something useful here, but it sounds like you can grab some code or ideas about 404:

https://processwire.com/talk/topic/4884-hook-before-a-404-exception/

yes, here it is: https://github.com/harikt/Assets/blob/master/Assets.module#L59

https://processwire.com/talk/topic/5724-404-search-module/

Edited by horst
added link to Github
  • Like 3
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...