Forum Moderators: open

Message Too Old, No Replies

Redirecting HTML to HTML pages on same IIS server

301 redirect on IIS

         

samseo

11:18 am on Jan 24, 2007 (gmt 0)

10+ Year Member



This is a very simple question, so please pardon me for asking this - i am sure people have asked a number of times - but i somehow could not locate an exact answer.

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

pageoneresults

12:56 pm on Jan 24, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



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.

7_Driver

1:16 pm on Jan 24, 2007 (gmt 0)

10+ Year Member



You can tell IIS to serve content for one folder from another folder, like this:

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.