0

So i should be able to visit rsstest/test.xml and be forwarded to article.xml if i don't have a user agent of wibble.

why doesn't this work?

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

thanks in advance

user1242345
  • 67
  • 3
  • 8

1 Answers1

0

Try changing the rule to this.

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

Using redirect sends a HTTP 301 or 302 to the client, telling the client that it should try to access the page using another URL.

Rewriting happens on the server, and simply is a translation of one URL to another, that is used by your web application. The client will not see any change.

Ren
  • 1,111
  • 5
  • 15
  • 24