Welcome to WebmasterWorld Guest from 184.108.40.206 , register , free tools , login , search , pro membership , help , library , announcements , recent posts , open posts Become a Pro Member
Adding multiple 301 redirects in IIS7 Practically, how can I get hundreds added? bhonda msg:4529635 1:04 pm on Dec 19, 2012 (gmt 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?
phranque msg:4529644 1:40 pm on Dec 19, 2012 (gmt 0)
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] dstiles msg:4529745 9:37 pm on Dec 19, 2012 (gmt 0)
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. g1smd msg:4529748 9:47 pm on Dec 19, 2012 (gmt 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.
bwnbwn msg:4536013 9:42 pm on Jan 14, 2013 (gmt 0)
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.