The <from>
clause was incorrect:
<rule>
<condition name="host" operator="equal">^(www.)?test.redirect.com$</condition>
<from>^(.*)</from>
<to type="redirect" last="true" encode="true">http://www.redirect.com/test/test-123</to>
</rule>
Question
I have the following redirect in place:
<rule>
<condition name="host" operator="equal">^(www.)?test.redirect.com$</condition>
<from>^?</from>
<to type="redirect" last="true" encode="true">http://www.redirect.com/test/test-123</to>
</rule>
It does redirect, however it redirects to http://www.redirect.com/test/test-123http://www.redirect.com/test/test-123
. Does anyone know why it is outputting twice like that?
As a side note I want to add that it is NOT being redirected twice.
Solution
The <from>
clause was incorrect:
<rule>
<condition name="host" operator="equal">^(www.)?test.redirect.com$</condition>
<from>^(.*)</from>
<to type="redirect" last="true" encode="true">http://www.redirect.com/test/test-123</to>
</rule>