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
How to restrict access to specific folders using variable "UserRoleID"?
Using one keyboard and mouse with two computers at the same time
Window Server 2003
What's a good backup? Using Backup Exec 11d, 12.5, and 2010 (different sites)
no video no beeps
Central Contact Store for AcitiveSync Users
Export access query results to excel using vba code
How do I check to see if my exchange 2003 is an open relay? (not using a open relay tester tool online, but on the console)
best practice for cross-database SPs
c# sub menu items