I’m having an issue with redirects. I’ve set my “error_page” to resource 2. Yet when I try to access a resource that’s been deleted, Modx redirects instead to resource 322. I have no idea why. According to my browser, there is 1 response header: “301 Moved Permanently” – which helps me not.
Is there a way to somehow log, capture or inspect internal redirect actions in Modx? Is there a system event I can hook into to capture the redirect process prior to the headers being sent?
I just want to figure out why Modx is using resource 322 as the 404 page, instead of resource 2.
Welcome to the community @zenpixel! I don’t know of a way to inspect MODX’s redirects internally, but sites like Redirect Detective will.
Sorry I can’t be more help. I’m new and learning as well.
Is it possible that you have a context, user, or usergroup setting called
error_page with a value of 322?
Otherwise, it could be a cache problem (MODX or browser).
The first thing to try is manually deleting all files in the core/cache directory.
If that doesn’t work, try visiting the site with your browser in Private or Incognito mode.
If that doesn’t work, I’d try editing the system setting, deleting it’s value completely and re-entering it, then manually deleting the cache files again and visiting in Private or Incognito mode.
If none of that does it, you might look in the
modx_system_settings table in the DB to see the
error_page value there and while you’re there, repair that DB table.
BTW, what’s the value of your
unauthorized_page System Setting?