Skip to content
November 6, 2012 / red1s

Redirect users from a SharePoint 2007 site to 2010


Recently we had moved our 2007 implementation across to 2010 however there were still users accessing and working with bookmarks and other components which linked directly back to the files.

In order to overcome this we used an add to IIS 7 called URL Rewriter (note there is also an extension for IIS 6 here)

Please note that this only works if your SharePoint 2007 environment is installed on Server 2008 with IIS 7

Install IIS 7 URL Rewriter:

clip_image001

clip_image002

Once installed Open up IIS

clip_image003

Go to your site and Select "URL Rewrite" then "Open Feature" from the menu:

clip_image004

Select ‘Add Rules’ from the right hand actions menu:

For this scenario I’ll be redirecting users from a SharePoint 2007 Site Collection to a SharePoint 2010 Site Collection i.e http://sharepoint2007/sites/thermal and http://sharepoint2010/sites/thermal

Choose Blank Rule:

clip_image005

Give the Rule a name:

clip_image006

Leave Requested URL and Using the same as a default:

clip_image007

For pattern enter: (.*)

clip_image008

You are able to test it which I would recommend before implementing it:

clip_image009

Keep ignore case box checked:

clip_image010

For Conditions keep Logical Grouping set to Match All

clip_image011

Click the Add button to add a condition

– For condition Input enter {URL}

  • For Check if input string keep it as Matches the pattern
  • For Pattern enter: thermal(/.*)
  • Test the pattern to see if it works
  • Click OK

clip_image012

Under Action Select Redirect for ActionType

For Action properties Redirect URL enter

http://sharepoint2010/sites/thermal to redirect only to root level site collection level

To redirect to sub directories you would enter http://sharepoint2010/sites/thermal {c:1}

If you are using back-references make sure you check off the append query string box

clip_image013

If this will be a permanent-redirect select Permanent (301) for the Redirect Type

Click the apply link on the top right under Actions

clip_image014

Browse to your SharePoint 2007 (http://sharepoint2007/sites/thermal ) site collection and you should be redirected to the 2010 site (http://sharepoint2010/sites/thermal)

Quick Note – If you’re testing this and your first rule is incorrect it will seem not to work. In order to get it to work you’ll need to clear out your browsers cache.

You can also go into your web.config file for that web application to where the Redirect Feature writes to and look for the Rewrite and this is what the tag looks like there …I found it quicker just to update the web.config once I knew what I was doing Winking smile

 

<rewrite>
  <rules>
    <rule name="Redirect to Sharepoint 2010" stopProcessing="true">
      <match url="(.*)" />
      <conditions>
                        <add input="{URL}" pattern="sites/thermal(/.*)" />
      </conditions>
      <action type="Redirect" url=http://sharepoint2010/sites/kio{C:1} />
    </rule>
  </rules>
</rewrite>

 

References

http://www.iis.net/learn/extensions/url-rewrite-module/url-rewrite-module-video-walkthrough

http://jshidell.com/2012/03/07/iis7-url-rewrite-redirect-from-sharepoint-2007-to-sharepoint-2010/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: