So, sometime last year, RDA engaged in a project with a client to migrate a SharePoint 2003 environment to SharePoint 2007. After some initial planning, we determined that a one-time content database migration was going to be the best approach. However, we had a few complications to consider:
- When using this upgrade path, SharePoint 2007 takes some liberties with the URL structure of the sites once the databases are attached to the 2007 environment and upgraded. For example, the familiar "C" addresses of 2003 (Ex: http:\\sharepoint2003\C10\HR) were converted to "Topics" (Ex: http:\\sharepoint2003\Topics\HR).
- The client was not incredibly happy with their existing site taxonomy in general and wanted to take the opportunity to rearrange their sites as part of the upgrade.
The problem: The project would be considered a failure by the user community if everyone lost their IE favorites and links already embedded in content. We needed a solution to redirect URL requests from the old URL schema to the new locations.
Todd Klindt has an excellent article on different options for implementing redirection in SharePoint. Check it out here: http://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=48
Upon reviewing the various options, I decided that none of the techniques would really work for the size and scope of what was needed. We needed:
- A way to define redirection farm-wide - for hundreds of sites. Not just one-off rules for redirecting single pages or sites.
- A way to redirect all URLs for ALL content under a site - not just the first page of the site. If the user linked to an image 15 folders deep in a site, that link should still function even if the site is moved or renamed.
- Immediate redirection - no 5 second wait for redirection pages. Ideally, the user shouldn't even realize they've been redirected.
http://rdacollaboration.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=28073
The SharePoint URL Redirector features:
- Regular Expression based rules - Permits massive flexibility in redirecting content requests. Entire sites of content to be redirected to other locations in a single rule. Not just single pages.
- Test Driven Design - Built-in testing interface simplifies the design and upkeep of redirection rules. Immediately see conflicting rules or URLs that are no longer valid.
- Centralized Rule Management - UI for maintaining rules is integrated into SharePoint Central Administration.
- Immediate Redirection - Redirection is immediate. Users typically don't even notice that they've been redirected from their original URL. No annoying "You'll be redirected in 5 seconds" pages.
- Scalable - Creatively caches rules and translations to maintain page-load performance. Has been tested with hundreds of redirection rules utilized with no perceived difference in page load times.
- Ability to copy rules - Rules can easily be copied to other SharePoint web applications.
- Chainable - Complex redirection can be performed by chaining multiple rules.


In the end, using this solution, we successfully provided seamless redirection for all content in over 350 sites (and many many more sub-sites). Most user's have never noticed a difference. Since then, several other RDA'ers have utilized it on their projects for other reasons such as:
- Accommodating Site Moves - If you ever have to relocate a site to a new site collection because it's gotten too large and needs its own content databases, you can redirect the old URL scheme to the new one. No need to have to explain to users why you moved their site and broke their IE favorites.
- Fill in holes in the URL scheme of your site - For example, if all of your sites are located under http://company.com/sites/* (a wildcard managed path), then there is no page directly under http://company/sites. Redirect that URL to a site directory or home page for a better overall experience for users of your environment.
- Vanity URLs - Configured properly, you could setup a vanity URL at http://finance.company.com that redirects the user to the real site at http://depts.company.com/sites/finance. Sometime soon, I'll post an article on exactly how to do this.
So, please check it out. I highly suggest reading the documentation posted on CodePlex with the tool, and utilizing the test-driven approach to defining rules. It's really fun to see the green indicator light up after you successfully define and test a rule! Also, if you're unfamiliar with Regular Expression syntax, a pretty good overview can be found here: http://www.codeproject.com/KB/dotnet/regextutorial.aspx


13 comments:
Hmm, I just get the dreaded Unknown Error (Go Back To Site) page when I click my newly created URL Redirector Application Management link...:(
Used the install.cmd batch file, and it added & deployed ok, judging by the new link in app management.
Any thoughts?
P.
Couple of things to try:
- Execute 'stsadm -o execadmsvcjobs' and retry.
- Check to see if you have access to write to '\Inetpub\wwwroot\wss\VirtualDirectories\[Web App]\_app_bin'.
Let me know if either of those work.
Thanks!
i deployed the redirector ok but when i try to use it the is the following message.
The 'URL Redirector' feature is not activated for this Web Application. Changes below will not have an effect.
Yes - you need to go out to "Central Admin -> Application Management -> Manage Web Application Features" and activate the "URL Redirector" feature for whichever web apps you want to apply redirection rules.
The rule editing screens are accessible for all web apps, but the rules you define will only have an effect for those web apps that have the feature turned on.
Hi Jason;
Thank you for developing this great app.
I'm having a slight problem with it in our production environment though. In Central Admin when I click on the linkk to go to the app I receive the below error meessage. We have 2 web front ends and 2 index server. Central Admin is running on the index server. The permissions have been applied correctly on the _app_bin directory. I also copied a urlmapping.xml file from the dev machine to the prod machines and it will forward correctly using the xml file. I just cannot get the webapp to run correctly.
Any help would greatly be appreciated.
Regards - Jon
The resource object with key 'Title' was not found. at System.Web.Compilation.ResourceExpressionBuilder.ParseExpression(String expression, Type propertyType, ExpressionBuilderContext context)
at System.Web.UI.BoundPropertyEntry.ParseExpression(ExpressionBuilderContext context)
at System.Web.UI.ControlBuilder.FillUpBoundPropertyEntry(BoundPropertyEntry entry, String name)
at System.Web.UI.ControlBuilder.AddBoundProperty(String filter, String name, String expressionPrefix, String expression, ExpressionBuilder expressionBuilder, Object parsedExpressionData, Boolean generated, String fieldName, String formatString, Boolean twoWayBound)
at System.Web.UI.ControlBuilder.PreprocessAttribute(String filter, String attribname, String attribvalue, Boolean mainDirectiveMode)
at System.Web.UI.ControlBuilder.PreprocessAttributes(ParsedAttributeCollection attribs)
at System.Web.UI.ControlBuilder.Init(TemplateParser parser, ControlBuilder parentBuilder, Type type, String tagName, String id, IDictionary attribs)
at System.Web.UI.ControlBuilder.CreateBuilderFromType(TemplateParser parser, ControlBuilder parentBuilder, Type type, String tagName, String id, IDictionary attribs, Int32 line, String sourceFileName)
at System.Web.UI.ControlBuilder.CreateChildBuilder(String filter, String tagName, IDictionary attribs, TemplateParser parser, ControlBuilder parentBuilder, String id, Int32 line, VirtualPath virtualPath, Type& childType, Boolean defaultProperty)
at System.Web.UI.TemplateParser.ProcessBeginTag(Match match, String inputText)
at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding)
Execute "stsadm -o copyappbincontent" on SharePoint server and try again.
Jon - similar to Ramu's suggestion, it sounds like the resource files did not deploy correctly. There are 2 resource files (deployed to '12\TEMPLATE\FEATURES\URLRedirection\Resources'):
- urlredirection.resx
- urlredirection.en-US.resx
These files need to be copied to '12\Resources' and to 'App_GlobalResources' under the IIS directory for Central Admin.
If you copy then over manually, that should resolve your issue. It's tough to say why they didn't deploy correctly in the first place. Is your 'Windows SharePoint Service Timer' service running? You might also check the SharePoint logs for any errors related to the 'RDA - Url Redirection - Deploy Resource Files' job. If you see anything suspicious, post it here.
Thank you Jason and Ramu,
Copying the files from 'App_GlobalResources'
Regards - Jon
Jason, your first suggestion,
'stsadm -o execadmsvcjobs'
did the trick for us; exec'd the command and voila, one working URL Redirector function!
Now to figure out the syntax we need...;¬)
Many thanks,
P.
i have installed the RDA control on my site successfully, its working fine but only with the system account and not with other users. please suggest anything anybody.
its giving me 403 forbidden error when i login with other users
I added a release note about this on the CodePlex site. I think this is the issue your seeing:
"This release requires all users to have read access to the _app_bin directory under the site's virtual directory (ie: C:\Inetpub\wwwroot\wss\VirtualDirectories\[VirtualDirName]\_app_bin). Further, the app pool account for the Web Application needs to have read/write permissions to this same directory."
Hi. Great addon for SharePoint. I got everything working on my development machine which is only one server. but when I deploy this to my test environment I get an error when deleting a mapping. The error is:
The object with id f4ce992a-e3d6-443e-b859-8f8774a04ee1 does not exist in the configuration store. The object may have been deleted by another operation.
The test environimetn has two servers (one web and one index/central admin).
During the install, I had to copy the UrlMapping file from the Web Application server to the Central Admin server. And when I delete a mapping, it removes it from the UrlMapping on the Central Admin server but not the web server.
Brian
Sounds like it might be permission related. Check which account the SharePoint Timer Service is running under and make sure it has read/write access to the "_app_bin" folder and the UrlMappings.xml file in it, under the Web Application's virtual directories on each server (C:\Inetpub\wwwroot\wss\VirtualDirectories\[VirtualDirName]\_app_bin). Also, check to make sure that all users have read access to that directory and the UrlMappings.xml file.
Respond back if that doesn't get it.
Also, have you extended any of the Web Apps on your test environment into a new zone? If so, it won't copy correctly to the extended zones. That will be fixed in a future version.
Thanks!
Post a Comment