Forum Moderators: open
The question is:
I have changed my site and many of the old urls have now a new url location. They are all static html pages.
For example, mysite.com/a.html is now mysite.com/SomeDir/A1.html.
How do i do a redirect on a IIS server?
Can you please point me to the right information?
Thanks
For example, mysite.com/a.html is now mysite.com/SomeDir/A1.html. How do i do a redirect on a IIS server?
You'll need a program called ISAPI_Rewrite. But, before you do that, you'll need someone who can configure the rewrite rules in your ISAPI httpd.ini file.
Depending on how the old URIs are structured will determine how much work needs to go into your rewrite rules. If many of them have a pattern, then you can do pattern matching and use one rule to handle groups of URIs.
If there are no patterns, then you go through the tedious task of writing a rule for each redirect.
1. Fire up IIS manager
2. Right-click on the folder pages used to be in
3. Where it says "When connecting to this resource, the content should come from" - choose "A redirection to a URL"
4. Enter the URL that the content should come from (without a trailing / seems to work best for me)
5. Check - A permanent redirection for this resource.
Hopefully that will do what you want. If you've changed the page names as well as the location, then it won't. In that case, I just create a page for each "old" page that 301s to the new page.