In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Ben Turner) wrote:

> I am trying to find somewhere that I can identify a custom 404
> error page and then pull the page based on the document directory. 

If you just want to customize your 404 page (presumably to call a PHP 
script?), your web server documentation should be of assistance.  For 
instance, Apache's ErrorDocument directive 
<http://httpd.apache.org/docs/mod/core.html#errordocument> is quite simple 
to implement, as long as the hosting setup at least permits use of an 
.htaccess file.

By "pull the page based on the document directory" do mean that you want to 
display different versions of a 404 page depending upon what URL resulted 
in the 404 status?  For instance, /dir1/badpath1 would get "No such page, 
bozo" while /dir2/badpath2 would get "That page is not available, but 
here's our site map instead", etc.?  If so, then you may want to direct all 
404s to a single PHP script, then let the script generate appropriate 
output based on an env var such as PHP_SELF, REQUEST_URI, SCRIPT_NAME (see 
phpinfo() for a bunch of possibilities).

-- 
CC

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to