I’ve got IIS7.5 running, and I’m trying to match an explicit URL. The following code does not work.
<rule name="presid" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{REQUEST_URI}" matchType="Pattern" pattern="http://www.example.com/presid" ignoreCase="true" negate="false" />
</conditions>
<action type="Redirect" url="http://www.example.net/presid" />
</rule>
I’ve also tried escaping the periods:
http://www\.example\.com/presid
but that doesn’t seem to work either. How do I match a specific full URL using IIS7.5?
This works, but does not do exactly what I’m after: (.*)/presid, but I have images that break:
http://example.com/images/presid/eee.jpg
I don’t want that image to get redirected.
REQUEST_URI does not contain the hostname.
use this instead: