Forum Moderators: phranque
[vtcc.vt.edu...]
It looks like a native apache thing that recommends similar files. Is this true? I'd love to use this on my site(s) but within the site framework. I've been thinking of wrting a script like this for sometime, but don't have the time.
Anyone know if this is native apache stuff and/or where I could get a good php script that would do this for me?
From within PHP you get the RequestedURI and process the error from there.
Thats what I am doing or trying to do, however I am hosting static webpages with Apache and using mod_proxy to serve dynamic content (including a dynamic 404 page) from JSP. Unfortunately the content of RequestedURI is lost in translation from Apache to Tomcat.
Simplified example:
# Pass missing file requests to jsp back-end with requested URL-path in query string
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*) http://back-end_domain_or_IP_address/404_error.jsp?REQ_URI=$1 [P]