Re: URL modification

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux