Forum Moderators: phranque
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
//allows you to have apache recognize html files as php
AddHandler application/x-httpd-php .html
AddHandler application/x-httpd-php .htm
RewriteRule (^.*)/(.*)/(.*)\.html$ tickets.php?venue=$1&event=$2&date=$3 [L]
ok so now i can write urls like this
domainname.com/venue-name/event-name/date.html
and my script gets....
tickets.php?venue=venue-name&event=event-name&date=date
but what i'm asking (especially JD hint hint...) is there a safer way of doing this....and also just to post it in case you are looking for a way
thanks, Tom
andreasfriedrich was so nice to post a complete text about how "Getting rid of those query strings". it's msg #:4 in the Bag-O-Tricks for PHP II - Thread [webmasterworld.com] here on webmasterworld.
you maybe wonder why i'm suggesting further reading? okay, this made it suspicious to me: mapping .html files to php in apache is one thing, removing querystrings another. with
RewriteRulethere is no need of
AddHandler, so i suggested you the thread above, because that one is using ModRewrite.
# allows you to have apache recognize html files as php
AddHandler application/x-httpd-php .html .htm
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteRule ^([^/]+)/([^/]+)/([^.]+)\.html$ /tickets.php?venue=$1&event=$2&date=$3 [L]
Jim