Page 1 of 1

mod_rewrite append querystring?

Posted: Tue Dec 15, 2009 11:31 am
by ianhull
Hi all,

i have this rule, however, i need to append the querystring after locationName i can't seem to work it out.
any help greatly appreciated.

apologies if this is in the wrong forum as I couldn't find SERVER/APACHE etc.

RewriteRule ^(.*)/search.aspx$ search.php?locationName=$1 [L]

Re: mod_rewrite append querystring?

Posted: Tue Dec 15, 2009 11:37 am
by ianhull
I solved it, thanks anyway

Code: Select all

 
 
 
RewriteRule ^(.*)/search.aspx$ search.php?locationName=$1%{QUERY_STRING} [L]
 
 
 

Re: mod_rewrite append querystring?

Posted: Tue Dec 15, 2009 12:03 pm
by AbraCadaver
ianhull wrote:I solved it, thanks anyway

Code: Select all

 
 
 
RewriteRule ^(.*)/search.aspx$ search.php?locationName=$1%{QUERY_STRING} [L]
 
 
 
Or:

Code: Select all

RewriteRule ^(.*)/search.aspx$ search.php?locationName=$1 [QSA,L]
QSA = Query String Append