Re: URL modification

From: Date: Thu, 06 Mar 2008 15:14:38 +0000
Subject: Re: URL modification
References: 1 2 3 4 5 6 7 8 9 10 11 12 13  Groups: php.general 
Request: Send a blank email to php-general+get-271080@lists.php.net to get a copy of this message
tedd wrote:
At 4:46 PM +0000 2/25/08, Nathan Rixham wrote:
It may be a good time to throw in this .htaccess which just palms eveything [not found] off to php [.htaccess] RewriteEngine On RewriteBase / DirectoryIndex handle.urls.php RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /handle.urls.php [L] [/.htaccess] I use this for everything nowadays, in terms of security it also allows me to keep every script out of the web root; and joy of joys don't need to change any rules for static files, as they will always be "found" and thus the rules won't apply: follow?
No, I don't. Please explain. Sounds cool.
Hi, As far as I can follow, this looks much like a 404 redirect trick which captures all "not found" files/paths. Based on the extension, you can still do fun or cool stuff and get more control about virtual paths etc. As always: TIMTOWTDI, so I'm gonna play with this .htaccess rule and see if this is better than a 404 handler. Aschwin Wesselius

« previous php.general (#271080) next »