Welcome to WebmasterWorld Guest from 184.73.112.180

Forum Moderators: ocean10000

Adding multiple 301 redirects in IIS7

Practically, how can I get hundreds added?

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

5+ Year Member



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)

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



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)

WebmasterWorld Senior Member dstiles is a WebmasterWorld Top Contributor of All Time 5+ Year Member



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)

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



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)

WebmasterWorld Senior Member bwnbwn is a WebmasterWorld Top Contributor of All Time 5+ Year Member



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.
 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month