Re: Using 404 instead of mod_rewrite

From: Date: Tue, 04 Feb 2003 06:30:23 +0000
Subject: Re: Using 404 instead of mod_rewrite
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-134215@lists.php.net to get a copy of this message
So '/error.php' is in the DOCUMENT ROOT, not the server root, correct? And I will get all the CGI environment available to the original requested document? Peter Janett wrote: > > Use a relative path in your ErrorDocument line, instead of a full url, and > you'll get what you are looking for. > > ErrorDocument 404 /error.php > > instead of: > ErrorDocument 404 http://www.yourdomain.com/error.php > > Note that even though error.php is in your root (or wherever it is), that it > can be called from anywhere in your web tree, so paths like > ../images/img.gif won't work if a 404 is thrown in > /directory/subdirectory/nothersubdirectory > > HTH, > > Peter Janett > > New Media One Web Services > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > New Upgrades Are Now Live!!! > Windows 2000 accounts - Cold Fusion 5.0 and Imail 7.1 > Sun Solaris (UNIX) accounts - PHP 4.1.2, mod_perl/1.25, > Stronghold/3.0 (Apache/1.3.22), MySQL 3.23.43 > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > PostgreSQL coming soon! > > http://www.newmediaone.net > webmaster "at" newmediaone.net > (303)828-9882 > > ----- Original Message ----- > From: "Dennis Gearon" <gearond@cvc.net> > To: <php-general@lists.php.net> > Sent: Monday, February 03, 2003 8:31 PM > Subject: [PHP] Using 404 instead of mod_rewrite > > > When one writes a 404 document in PHP, how do I get access to all the > > POST, GET, COOKIE, URL, protocol, Languages, etc. that the originally > > requested document came in with? > > -- > > -- > > > > Carpe Dancem ;-) > > ----------------------------------------------------------------- > > Remember your friends while they are alive > > ----------------------------------------------------------------- > > Sincerely, Dennis Gearon > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Carpe Dancem ;-) ----------------------------------------------------------------- Remember your friends while they are alive ----------------------------------------------------------------- Sincerely, Dennis Gearon

« previous php.general (#134215) next »