[thelist] mod_rewrite hell

Charlie Llewellin charliel at infohwy.com
Thu May 24 18:25:18 CDT 2001

Hi all,

I have a url such as


which I want to change to


I have 
RewriteEngine on
RewriteBase /travel
RewriteRule ^pages/([^\?]+)[\?]*(.*)$     page.php?t_dir=pages&t_page=$1&$2

in my .htaccess in the travel directory

Ideally I want the mod_rewrite work whether or not there is a query string
on the original url, but it will not see anything at all after the ? in the
original url

Echoing $t_page always gives cities.php even if the original url contains

Regex/Rewrite gurus, what am I doing wrong?


More information about the thelist mailing list