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.

有帮助吗?

解决方案

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>
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top