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.


IIS URL Rewrite Module! Let’s create a URL Rewrite Rule to redirect from the old MOSS 2007 site collection to migrated SharePoint 2010 site. Say our:

  • Source: “” 
  • Target: “”.

Step by Step Implementation:

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 the “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

Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two-decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. He has held various positions including SharePoint Architect, Administrator, Developer and consultant, has helped many organizations to implement and optimize SharePoint solutions. Known for his deep technical expertise, He's passionate about sharing the knowledge and insights to help others, through the real-world articles!

2 thoughts on “Redirect Old MOSS 2007 Site to New SharePoint 2010 Site during Migration using URL Rewrite

  • Thanks Salaudeen for useful post. How do we redirect SharePoint Onprem https://Sharepoint2013/sites/IT to SharePoint Online


Leave a Reply

Your email address will not be published. Required fields are marked *