How would I mod_rewrite a request for /baseball.htm into /query.php?q=baseball?
This should be doing it as far as I can tell, but for some reason it's not...
RewriteEngine on RewriteRule /^(.+).htm$ /query.php?q=$1
RewriteEngine on RewriteRule ^/(.+)\.htm$ /query.php?q=$1
But note this isn't good.. since say if you got a regular page /index.htm then it will be rewritten into /query.php?q=index so what you better do is having a prefix of a 'virtual' directory, like was suggested before 'sport'... and make it like this:
RewriteEngine on RewriteRule ^/sport/(.+)\.htm$ /query.php?q=$1
-Eli.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php