Reputation: 2012
I am trying to write a simple 301 redirect using the URL rewrite module. I have set the rule up using the interface in IIS 7.5. Unfortunately none of the rules I have added are actually working and I don't understand why.
As far as I can tell this means a request to http://www.example.com/folder/page.htm should redirect to http://www.example.com/folder
However I end up with 404 errors instead?
I have tried to find a simple example online but most of the ones I see are using regular expressions which I don't think I need. I also tried a wildcards and */folder/page.htm but this also gives me the same problem.
What am I doing wrong?
Upvotes: 4
Views: 17313
Reputation: 2012
Ok for anyone else who has this problem it appears you do not need to have the domain in the URL because this will cause the pattern not to match.
So in my case for step 4 I should enter folder/page.htm (not /folder/page.htm either!)
Now the redirect works.
Upvotes: 8