On Sat, 18 Sep 2004 22:33:09 +0800, in php.general [EMAIL PROTECTED] (Jason Wong) wrote:
>> Ok, it is like I thought, but if it is made in PHP is >> there a way to catch all the ID sent to the main page >> of tinyurl.com and then query the database? > >If your webserver is apache you could use its rewrite engine to ensure that >all requests to http://example.com/ gets processed by php (see apache docs). Further: Apache-solution One of the simplest methods (if the user is able to change the configuration of the server config or virtual host) is to point DocumentRoot to a file and not a directory. E.g. DocumentRoot /path/to/handler.php At least the apache following with debian stable will issue a warning (which could be ignored) that the directory-path does not exist. I suppose it only checks for the existance of a directory with that name. Another dirty method include using a 404-document for handling requests to files that do not exist: ErrorDocument 404 /404handler.php (one could still set a 200 OK-returncode) .. but all this is out of PHP-scope. -- - Peter Brodersen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php