문제

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