Cannot 301 redirect with IIS URL Rewrite Module

Posted by Justin on Server Fault See other posts from Server Fault or by Justin
Published on 2010-05-28T06:36:47Z Indexed on 2010/05/28 6:42 UTC
Read the original article Hit count: 392

I am trying to troubleshoot my issue with the URL Rewrite Module on IIS 7.

I migrated a Wordpress blog over to BlogEngine.net. There were only about 5 entries that I wanted to use 301 redirects to the new blog, so I wanted to simply create 5 exact match redirect rules using the rewrite module. For some reason the exact match rule never seems to take effect, I always get a 404 error when the original url is navigated to.

I verified that my exact match pattern matched the existing backlinks and it does. I then tried a simple test and got the same behavior, no redirection. I created a page, test.html, on my site, I then created a second page, test2.html. So my exact match pattern is:

"http://www.mydomain.com/test.html"

And the rule is supposed to do a 301 redirect to "http://www.mydomain.com/test2.html " The redirect never happens.

I created the steps for the rule based on the instructions in this page: http://learn.iis.net/page.aspx/461/creating-rewrite-rules-for-the-url-rewrite-module/

I don't see that I left out a step. After I apply the rule I've even gone as far as doing an IISReset to make sure it would be in effect but still no luck.

Any thoughts on what I might have left out?

(Note: my rewrite rules dont include the " " around them but I had to add since serverfault thinks I am trying to spam the system with multiple urls.)

© Server Fault or respective owner

Related posts about iis7

Related posts about redirect