Mike Laurencelle

I'm a SharePoint & Server Systems Administrator for Sears Home Improvement Products, headquartered in sunny Longwood, Florida. My primary functions revolve around SharePoint and Virtualization technologies.

I've been in the IT industry now for about 18 years. For me, IT is more than a job to make a living, more than a career to call my own. It's my passion. I am a self proclaimed geek and have interest in all things technology. I can't imagine being in any other field - I absolutely love what I do.

SharePoint sub-site redirection


Posted on : 12:31 AM | By : Mike Laurencelle | In : , , ,

We are in the process of migrating our sited from WSS to MOSS and found that one of the biggest time cost comes mainly from dealing with fixing broken links since our new MOSS farm has a different address than our current WSS farm. This presented an interesting problem. How do we make sure that the transition is as seamless as possible without re-writing hundreds or even thousands of links.

Links inside of SharePoint are easy since we've long since taught our users to use relative paths. However many of our users have bookmarks or home pages set to the old location and there are countless hundreds of saved emails and corporate documents that refer to the previous site. Well, Microsoft IIS URL Rewrite to the rescue!

This neat little free tool has saved us TONS of time in our migration plan by allowing us to have IIS redirect users automatically to the new location but on a department-by-department basis. In addition, it takes the parameters after the site location and passes them to the new location as well. So, if someone goes to http://wss.company.com/hr/vacationrequest.doc they are automatically redirected to http://moss.company.com/hr/vacationrequest.doc meaning that nobody has to update their links and nobody has to call helpdesk wondering why their links don't work anymore. Since once the migration is complete we plan to give the old name to the new site anyway (and keep the new name too) this makes for an excellent solution for us that means we spend absolutely ZERO time fixing broken links.

Pretty sweet, huh? So, how does it work?

First, install the IIS URL Rewriter which you can get on the iis.net site (prominant link in the upper-right corner) or you can go straight to the source and get it here: http://www.microsoft.com/web/spotlight/urlrewriter/?WT.mc_id=aff-web-corp-spotmar_iisnet2

The nice thing is that the install is non-disruptive and does not require a system restart. Then, you edit the web.config of the web applications on your WSS servers that you want to do redirects on, adding the following lines inside of the section:


Notice the match url section where the different subsites are listed. So, in this case, http://wss.company.com/credit and http://wss.company.com/finance and http://wss.company.com/hr will all be redirected to their moss.company.com equivalent whereas other sites like http://wss.company.com/informationsystems and http://wss.company.com/facilities will NOT be redirected.

As you want to add more sites to the migrated list, you just add more names to the match url section with each site separated by a pipe symbol. So, for instance, to add the informationsystems site to the list of redirected sites, you would change the match url section to look like this:


Note: the IIS URL Rewriter must be installed on all of your Web Front Ends and the web.config changes will need to be made on all Web Front Ends as well.

Share this :

  • Stumble upon
  • twitter

Comments (0)