In my use case, I need to encode {QUERY_STRING}
value and pass this value as a separate parameter. Here it is how it should work:
http://www.example.com?param1=value1¶m2=value2¶m3=value3
The URL can have n number of parameters and values may contain special characters and value is an alphanumeric string.
I need to transform the URL to:
http://www.example.com?param1=value1¶m2=value2¶m3=value3&originalQP=param1=value1%26param2=value2%26param3=value3
I added parameter called originalQP
and it should be always encoded.
How can I get this encoded string using mod rewrite flags?
I tried using B
and NE
flags but neither of them worked. I am not getting '&' being encoded in the transformed URL instead originalQP
value is being passed as param1=value1
.
How can I get complete value?