Monday, February 18, 2013

Redirect Old MOSS 2007 Site to New SharePoint 2010 Site during Migration using URL Rewrite

In a database attachment method of migration from MOSS 2007 to SharePoint 2010, we gradually moved site collections one by one by attaching content databases of individual site collections. It took a while to address migration fixes and make them in a good shape for each site collection.

Meanwhile, had to redirect Users to migrated SharePoint 2010 site collections when they hit old MOSS 2007 site collection URLs or access them from bookmarks. Ideally, once migration is completed, we must place a server redirect in publishing server (like F5/ISA) or DNS change to send users from old URL to new URL.

But in our case, As we move site collections one by one, only few site collections needs to be redirected.

Solution: IIS URL Rewrite Module! Lets create a URL Rewrite Rule to redirect from old MOSS 2007 site collection to migrated SharePoint 2010 site. Say our:

  • Source: "" 
  • Target: "".
Step 1: To start with, download and install URL Rewrite Module in Web Front End(WFE) Server(s) from:
sharepoint 2010 URL rewrite redirect

Step 2: Once installed, Go to IIS Manager >> Select your Source SharePoint web site ( >> In Right pane, open "URL Rewrite" Module
redirect sharepoint site iis

Step 3: Create new inbound rule by clicking Add Rule(s) >> "Blank rule" >> Give it a Name, say: "Redirect Marketing Site collection".
sharepoint redirect to site collection

Step 4: Under Match URL section, specify values as:
  • Request URL: Matches the Pattern 
  • Using: Regular Expression 
  • Pattern: (.*)
  • Select Ignore case check box
sharepoint redirect site

Step 5: Under conditions section, specify values as:
Logical grouping:
Match All
Click on Add button and enter:

  •         Condition input: {URL}
  •         Check if input string: Matches the Pattern
  •         Pattern: /sites/marketing(/.*)
  •         Select "Ignore case" check box
sharepoint redirect entire site

Step 6: In "Action" section, Enter the values as:

  • Action Type: Redirect
  • Redirect URL: Enter the target URL E.g. Http://"
  • Select "Append Query String" check box
  • Redirect Type: Permanent(301)
sharepoint redirect a site

Step 7: Save the rule by clicking "Apply" link from Right action Pane!

That's all! Moving forward, when users hit "" , they'll be redirected to "".
Its also possible to place a Page level redirect using Content Editor Web Part. Refer: Page Redirect Using CEWP JavaScript in SharePoint

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.

Check out these SharePoint products:

No comments :

Post a Comment

Please Login and comment to get your questions answered!

You might also like:

Related Posts Plugin for WordPress, Blogger...