0

我有以下重定向到位:Tuckey網址:重定向的URL輸出兩次

<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> 

它重定向,但它重定向到http://www.redirect.com/test/test-123http://www.redirect.com/test/test-123。有人知道爲什麼它會輸出兩次嗎?

作爲一個方面說明,我想補充說,它不會被重定向兩次。

回答

0

<from>條款是不正確的:

<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>