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
Cannot print any PDF document, only option is to save as .prn and then it does not print.
Dell Powerconnect switch 3524/48P PC/IP phones daisy chaining Vlan setup
Server Side Includes folder not in the right place?
New email accounts don't show up in Global List
Can I retrieve all my Windows XP settings and programs after I re-installed Windows on a seperate folder?
Blank characters being inserted into SQL Table via ADODB
XenServer Vs. Hyper V
Move a VM
Best method for automated use of Defrag, chkdsk, Disk cleanup, etc.
Best practice scenario in utilizing two LTO tape drives.