Hi,
How can I redirect
from:
/dosomething.asp?code=1234
or
/dosomething.asp?CODE=1234
(mind the difference: code and CODE in the querystring).
to:
/dosomething/code/1234
When I create an Advanced rule with:
Case sensitive: false
Condition:
- type=parameter
- type parameter=code
- operator=equal
- value=(.*)
Rewrite from: /dosomething.asp
Rewrite to: /dosomething/code/%1
it rewrites correct when the querystring in my URL is in lowercase, but when it is in uppercase, the param is not passed, resulting in an incomplete url:
/dosomething/code/
I have tried to add an extra OR-condition with:
and
But then only the last condition is applied, in this case only the query-param in uppercase is processed correctly.
I have also tried to use an XML rule:
<rule>
<from>^/dosomething.asp\?(code|CODE)=(.*)$</from>
<to type="redirect">/dosomething/code/$2</to>
</rule>
but here the question-mark is not recognised as a valid character and the rule is never executed.
Someone any idea how to make this work?
Best regards,
Edwin