Re: rewrite.php or redirect.php

From: Date: Mon, 08 Jan 2001 08:45:32 +0000
Subject: Re: rewrite.php or redirect.php
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-33203@lists.php.net to get a copy of this message
am 06.01.2001 17:51 Uhr schrieb Diego Fulgueira unter dful@metahogar.com: > I made a similar question a couple of days a go. > Some guys gave me nice tips. My problem was solved very well in this way: > > 1. Configure Apache to run handle404.php. Don't mind about the log, you can > clean it with cron using regex to erase all 404 errors. If you only want to > erase unhandled 404 errors, you can throw another error (wichever you like) > from handle404 just to serve as a flag. > > 2. Using phpinfo in handle404.php can help you know what variables are > available. If you find it hard to pass variables in the QUERY_STRING, use > session variables (the cookies' way) instead. > > 3. Inside handle404.php you can look for the file and, once you find it, > include or require it. All variables defined in handle404.php will be > available in the included file. You can even pass arrays called > HTTP_GET_VARS or something else to emulate the normal ones. > > Something else that could help is using UNIX links or virtual paths. > > Cheers. Thank you very much for you clear description. The question that still remains is: Is this more performant than letting Apache do the via a RewriteRule Directive? Does anybody know? Tino www.interpool-online.de

« previous php.general (#33203) next »