appending GET string to mod_rewrite
Posted: Tue Jun 26, 2007 12:05 am
this really has me stumped for some reason. Im using mod_rewrite to make pretty url's... turning something like
into using which works great. my issue is, i want to add some extra GET data to the url, and append that to the end of the rewritten url.. ie:
into
my rule so far is
anyone know where i'm messing up?
Code: Select all
http://sample.com/admin/indexCode: Select all
http://sample.com/admin.php?page=indexCode: Select all
RewriteRule ^admin/([^/]+) admin.php?p=$1Code: Select all
http://sample.com/admin/index?foo=bar&bat=bazCode: Select all
http://sample.com/admin.php?page=index&foo=bar&bat=bazCode: Select all
RewriteRule ^admin/([^/]+)/\?(.*) admin.php?p=$1&$2