I’ve worked-around the solution to transform all uri to one page via ErrorDocument.
The reason behind this is to send Files AND folders (nice urls) to one page. However, I need the URI string to be sent to index.php?uri=string . Is this possible via ErrorDocument, or how do I do this?
So I need to rewrite the
to
Is this possible at all, if, how?
If your server supports server-side include (SSI) then you use the following
404.shtmlas your ErrorDocument:EDIT: there is a simpler way: create a PHP file as your ErrorDocument and you can do anything under the sun in it! 🙂
EDIT2: you can access the original URI using
$_SERVER['REQUEST_URI']EDIT3: heck, if you are just redirecting to
index.phpon the same host, you can just set thatindex.phpfile as your ErrorDocument and detect if the request is redirected from 404 error by checking if$_SERVER['REDIRECT_STATUS'] == '404'