0

したがって、wibble のユーザー エージェントがない場合は、rsstest/test.xml にアクセスして article.xml に転送できるはずです。

なぜこれが機能しないのですか?

<rule name="df" patternSyntax="ExactMatch" stopProcessing="true"> <match url="^rsstest/test.xml" negate="true" /> <conditions> <add input="{HTTP_USER_AGENT}" pattern="Wibble" negate="true" /> </conditions> <action type="Rewrite" url="article.xml" /> </rule>

前もって感謝します

4

1 に答える 1

0

ルールをこれに変更してみてください。

<rule name="df" patternSyntax="ExactMatch" stopProcessing="true"> 
    <match url="^rsstest/test.xml" negate="true" /> 
    <conditions> 
        <add input="{HTTP_USER_AGENT}" pattern="Wibble" negate="true" />
    </conditions> 
    <action type="Redirect" url="article.xml" /> 
</rule>

リダイレクトを使用すると、HTTP 301 または 302 がクライアントに送信され、別の URL を使用してページへのアクセスを試みる必要があることがクライアントに通知されます。

書き換えはサーバー上で行われ、Web アプリケーションで使用される、ある URL から別の URL への単純な変換です。クライアントには変更が表示されません。

于 2012-10-30T10:24:52.937 に答える