Re: URL modification

From: Date: Mon, 25 Feb 2008 16:46:02 +0000
Subject: Re: URL modification
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.general 
Request: Send a blank email to php-general+get-270065@lists.php.net to get a copy of this message
Daniel Brown wrote:
On Sat, Feb 23, 2008 at 6:27 AM, Richard Heyes <richardh@phpguru.org> wrote:
You could also forego the <Files> bit if you're willing to accept URLs like this: /rental.php/property/23425
    I was waiting to see if anyone made mention of that while reading
through the thread. I think this is a highly underused built-in feature. PHP is already, out-of-the-box, ready for search-engine-friendly URLs.
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?

« previous php.general (#270065) next »