我想永久重定向
/?industry_id=3 to /industry/3/athletics
我尝试了规则:
<rule>
<from>/?industry_id=3$</from>
<to type="permanent-redirect" last="true">/industry/3/athletics</to>
</rule>
<rule>
<from>/?industry_id=3$</from>
<to type="permanent-redirect" last="true">/industry/3/athletics</to>
</rule>
<rule>
<from>/\\?industry_id=3$</from>
<to type="permanent-redirect" last="true">/industry/3/athletics</to>
</rule>
<rule>
<from>/\?industry_id=3$</from>
<to type="permanent-redirect" last="true">/industry/3/athletics</to>
</rule>
但没有成功。
我试过这个:
<rule match-type="regex">
<note>Request page is deprecated</note>
<condition type="query-string">industry_id=3</condition>
<from>/</from>
<to type="permanent-redirect" last="true">/industry/3/athletics</to>
</rule>
这适用于重写,但是由于我猜的其他规则,我得到了“重定向太多”,即使设置了参数 last="true"