Welcome to WebmasterWorld Guest from 54.204.198.71

Forum Moderators: ocean10000

Message Too Old, No Replies

Adding multiple 301 redirects in IIS7

Practically, how can I get hundreds added?

     
1:04 pm on Dec 19, 2012 (gmt 0)

Full Member

10+ Year Member

joined:June 29, 2005
posts: 216
votes: 0


So, long story short, I've got a site that is changing its entire structure, but staying on the same domain. I need to add a whole bunch of 301 redirects from old pages to the new.

That's fine. The problem, is that we're talking hundreds of redirects.

I'm not interested in reasons why this move is a bad idea, only the practicalities of how I can get these redirects implemented in the shortest amount of time.

Is there a way to 'batch add' redirections to IIS7?

Essentially, I will have a list of 'Old' links and the corresponding 'New' links.

Any ideas?
1:40 pm on Dec 19, 2012 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10596
votes: 22


there are several ways to do this but here is a supported extension that would probably work for you.

URL Rewrite Module : The Official Microsoft IIS Site:
http://www.iis.net/learn/extensions/url-rewrite-module [iis.net]
9:37 pm on Dec 19, 2012 (gmt 0)

Senior Member from GB 

WebmasterWorld Senior Member dstiles is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:May 14, 2008
posts:3135
votes: 4


I do a similar thing but using the 404 (missing page) response.

You can edit the 404 error response in IIS Manager to direct it at a file in (eg) the site's root. In that 404 processing page (typically an ASP file), detect the filename and issue a new one, remembering to add the 302 or 301 code in place of the 404. As a final trap, if the page isn't recognised within this list then issue a real 404.
9:47 pm on Dec 19, 2012 (gmt 0)

Senior Member

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2002
posts:18903
votes: 0


If there is a pattern to the old and new URL pairs, then you might only need one or two rules to redirect hundreds of different URL requests to their new location.
9:42 pm on Jan 14, 2013 (gmt 0)

Senior Member

WebmasterWorld Senior Member bwnbwn is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Oct 25, 2005
posts:3533
votes: 15


Most here assume it is a database driven site you didn't state that. Is it a database drivern site or an older site in static htm pages? Makes a big difference trying to get the best answer.