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.

Was it helpful?

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>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top