I have figured out URL Rewrite is probably broken hence why i have another problem with it redirecting DNS my IT is giving me so i made a very simple test case which doesn't work either so i am trying to fix this issue currently appearing on a production server.

I created a host file redirect test.useless.com

Ran a ping and it resolve properly. So i created a simple redirect rule for redirecting that name to google.

<rule name="something" stopProcessing="false">
    <match url="(.*)" />
        <add input="{HTTP_HOST}" pattern="*/test.useless.com/*" />
    <action type="Redirect" url="http://www.google.ca/" redirectType="Permanent" />

So this match whatever url with http://test.useless.com/ right now i don't care about any page i keep it simple. Ran the rewrite test window and copy pasted that url and ran the test and it pass. The Redirect then should send to google.ca.

Why nothing works. There is no log in IIS for this anywhere the URL Rewrite rule in on root node of IIS and i have sites with that Hostname in it.

1 Answer 1


I think the pattern field in the condition must be a regular expression, so something like:


A regular expression can't start with a *, that's a quantifier for the previous character.

  • The pattern works when i put http://test.useless.com/ but still doesn't redirect to google.
    – Franck
    Jan 11, 2021 at 18:26
  • I think the http_host variable would have a value of test.useless.com without http Jan 11, 2021 at 18:49
  • Still doesn't work. Anyhow i need the slashes as i will need it later to differenciate between the sub domain and the main domain
    – Franck
    Jan 11, 2021 at 18:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .