Posted by Philip Ronan on 10/12/05 17:23
"juglesh" wrote:
> So, how can we make a 404 page that either shows the poblem URL in the
> address bar, or can get the problem URL so I can display it in a text
> box where the user can correct it and click a 'go' button? (I know how
> to make that text box, but not how to get the problem URL).
You need to add an ErrorDocument directive to your .htaccess file:
<http://httpd.apache.org/docs/1.3/mod/core.html#errordocument>
e.g.
ErrorDocument 404 /error/my404.php
In your script at /error/my404.php, you can get the name of the originally
requested URI from $_SERVER['REQUEST_URI']
Once you've done that, any requests for non-existent files in the hierarchy
covered by your .htaccess file will be dealt with by your custom script.
--
phil [dot] ronan @ virgin [dot] net
http://vzone.virgin.net/phil.ronan/
[Back to original message]
|