Welcome to WebmasterWorld Guest from 188.8.131.52 , register , free tools , login , search , pro membership , help , library , announcements , recent posts , open posts Pubcon Platinum Sponsor 2014
Adding multiple 301 redirects in IIS7 Practically, how can I get hundreds added? bhonda
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?
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
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
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.
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.