Microsoft
Software
Hardware
Network
Question : htaccess Partial Query String Rewrite
I have a client that changed his store code which changes one parameter in the query string.
See Store_Code=ABC in this link.
mysite.com/merchant.php?St
ore_Code=A
BC&Screen=
CTGY&Categ
ory_Code=W
S-S
Using .htaccess modrewrite,
how do I rewrite this so it becomes Store_Code=XYZ
mysite.com/merchant.php?St
ore_Code=X
YX&Screen=
CTGY&Categ
ory_Code=W
S-S
OR remove it so it becomes
mysite.com/merchant.php?Sc
reen=CTGY&
Category_C
ode=WS-S
Example;
RewriteCond %{QUERY_STRING} ^Store_Code=ABC$
RewriteRule what goes here?
Answer : htaccess Partial Query String Rewrite
This should look like this:
RewriteCond %{QUERY_STRING} ^Store_Code=ABC(.*)$
RewriteRule ^/merchant.php$ /merchant.php?Store_Code=X
YZ%1 [R,QSA]
Regards,
Arty
Random Solutions
Powershell Syntax for Exchange 2007
Red X appears instead of image (issue on client's server, but not my test server) for report in IE7, IE8
Moving drivers from one harddrive to another
Routing problem with Cisco ASA 5505
SQL Insert trigger if one field is changed
How to stop theft of services?
RunningValue can't use a group clumn as scope if another row is using a row group scope?
BES Enterprise 4.1 to BES Express
VBS Script stops when it encounters an offline computer
How do I add check boxes which update several records by their id from the checkbox?