Answer the question
In order to leave comments, you need to log in
Is it possible to pass the address of the requested page in the GET parameter in .htaccess with a 404 error?
I want to write CNC, naturally for the first time. Easy ways are not for me, I don't want to use regexps. Somewhere I pulled out the idea that it is possible, with a 404 error (page not found), to make a transition to the script, passing it the address of the requested page in the GET parameter, and parse the whole thing in it and display beauty. Is it possible at all? If so, how?
Ps I know that there is a rule ErrorDocument. With the 404th error, it works like this: ErrorDocument 404 /404.html (used a couple of times).
Answer the question
In order to leave comments, you need to log in
The idea is strange, but on topic - do a redirect from "page not found" to "script" , in which you get the address using the referrer, this will keep the address bar clean.
Update: I don't necessarily need a way to implement this directly, I need a way to pass the address of the requested page to the php script.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question