This project is read-only.

URL rewrite with BE

May 29, 2013 at 4:49 AM
Hi, please I need some help with URL rewriting. I disabled the option to add the date to the URLs, but google already crawled my links with that format, creating duplicate URLs and affecting SEO.

For example, the new URL is like that:

but the crawled url from Google is like this

I created the following rewrite rule in my web.config using the Microsoft URL Rewrite Module 2.0 for IIS 7:
<rule name="extensionless" stopProcessing="true">
          <match url="(.*)press/post/(\d\d\d\d/\d\d\/\d\d\/)?(.*)" />
          <action type="Redirect" url="{R:1}post/{R:3}" redirectType="Permanent" />
This rule is redirecting to the correct URL like this one:
But when I check the response headers for a 301 redirect with this online tool:

The result doesn't respond with a 301 redirect as expected. The response is a direct link.

What can I do to fix it?