0

永久リダイレクトしたい

/?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>/&#63;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" が設定されていても、他のルールが原因で「リダイレクトが多すぎます」が発生しました

4

1 に答える 1

1

それは奇妙に思えます。以下は私のために働いた:

<rule>
  <condition type="query-string">page=download</condition>
  <from>/</from>
  <to type="permanent-redirect" last="true">/downloads</to>
</rule>

あなたも言及したように、他の干渉ルールが必要です。

于 2013-04-05T05:44:08.767 に答える