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.
- I provide a name for the rule
- I select Matches the Pattern under Requested URL:
- I select Exact Match
- I enter the pattern http://www.example.com/folder/page.htm
- I check Ignore case
- Under action I specify Action type as Redirect
- I set the redirect URL as http://www.example.com/folder
- I check the Append query string
- I select permanent 301 under redirect type
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?