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:
Once installed Open up IIS
Go to your site and Select "URL Rewrite" then "Open Feature" from the menu:
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:
Give the Rule a name:
Leave Requested URL and Using the same as a default:
For pattern enter: (.*)
You are able to test it which I would recommend before implementing it:
Keep ignore case box checked:
For Conditions keep Logical Grouping set to Match All
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
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
If this will be a permanent-redirect select Permanent (301) for the Redirect Type
Click the apply link on the top right under Actions
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
<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/
Leave a comment