質問

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