Not redirecting using condition in urlrewrite.xml



I'm checking for a condition and redirect to a particular HTML. But, it doesn't go to the particular page when I add in urlrewrite.xml


My actual code was



<rule>
<name>Landing page redirection for new slide page Car Insurance</name>
<condition type="parameter" name="variant" operator="equal" next="or">slide</condition>
<from>/insurance/car-insurance\.html($|\?(.*)$)</from>
<to>/car-insurance/new-compare-rates.html?mode=slide&amp;$1</to>
</rule>


Now when I add the condition /car-insurance-partners.html it looks like



<rule>
<name>Landing page redirection for new slide page Car Insurance</name>
<condition type="parameter" name="variant" operator="equal" next="or">slide</condition>
<condition type="request-uri">/car-insurance-partners\.html</condition>
<from>/insurance/car-insurance\.html($|\?(.*)$)</from>
<to>/car-insurance/new-compare-rates.html?mode=slide&amp;$1</to>
</rule>


When I give the url like /car-insurance-partners.html, it doesn't redirect to the page insurance/car-insurance.html.. Is the condition wrong?


Thanks in advance


No comments:

Post a Comment