I’m trying to configure a URL rewrite rule in Bloomreach Experience Manager that redirects based on a query parameter value. Here’s my use case:
From URL:
https://www.example.com/microsite/advice/?advisorId=john.doe@domain.com
To URL:
https://www.exampleadvisors.com/john.doe
So I need to extract the part before @domain.com from the advisorId query parameter and use it in the rewritten URL.
below is the rule I’m trying to use:
<rule>
<condition type="header" operator="equal" name="host" next="and">www.qa.example.com</condition>
<condition type="query-string" operator="matches" name="advisorId">([a-zA-Z0-9\.]+)@domain\.com</condition>
<from>^/microsite/advice[/]?$</from>
<to type="temporary-redirect" qsappend="false">https://www.exampleadvisors.com/$1/</to>
</rule>
The rule isn’t working as expected. Can someone hep me resolve this one?