mandi224
asked on
IIS 7 301 Redirect for all contents of a directory
I'm using IIS 7 URL rewriting on our site and want to have a 301 redirect of everything in our /catalog directory.
I added this rule to the web.config at the root of the site:
When I go to http://www.mysite.com/catalog, it performs the 301 redirect correctly.
However, if I go to something like http://www.mysite.com/catalog/category/something.aspx, it does not perform the 301 redirect like I want it to.
Is my match URL not correct? How can I get EVERYTHING within /catalog/ to 301 redirect to /home?
I added this rule to the web.config at the root of the site:
<rule name="No Catalog">
<match url="^Catalog*$" />
<action type="Redirect" redirectType="Permanent" url="/home" />
</rule>
When I go to http://www.mysite.com/catalog, it performs the 301 redirect correctly.
However, if I go to something like http://www.mysite.com/catalog/category/something.aspx, it does not perform the 301 redirect like I want it to.
Is my match URL not correct? How can I get EVERYTHING within /catalog/ to 301 redirect to /home?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://www.iis.net/ConfigReference/system.webServer/httpRedirect