Changing a web application URL and dealing with requests for the old URL by Brendan Griffin


















This post was found on the From the Field Blog and was posted by Brendan Griffin





 


I recently had a discussion with a customer who was planning on changing the URL of their MOSS 2007 Intranet Web application. This is generally a straightforward procedure that is easily achieved either by amending the alternate access mapping configuration of the web application in question OR extending the web application into a new zone. The customer was comfortable with this and had a plan in place for this change.  In this particular case the customer wanted to change the URL from http://sharepoint.company.com to http://intranet.company.com


The customer was particularly concerned about the the myriad of links that end users had to content that was held in Internet Explorer favorites’ and embedded in work documents that referenced the old URL – http://sharepoint.company.com and they wanted to put a mechanism in place that would automatically redirect end users to the new URL when a link that referenced the old URL was selected.


For example a user could click a link that referenced a site collection named Marketing using the URL http://sharepoint.company.com/sites/marketing they wanted this to be automatically redirected to http://intranet.company.com/sites/marketing.


This objective was easily achieved using a redirect site in IIS 6.0 and involved the following steps.


·         Creating a new website in IIS on each WFE in the farm using the default application pool as it has no need to communicate with any component of MOSS 2007.


·         Configuring the redirect site to listen on the host header sharepoint.company.com (it’s important the MOSS 2007 specific configuration changes are performed prior to this to avoid any conflicts in IIS)


·         Selecting the Home Directory tab of the properties of the redirect site and selecting the following settings, this not only redirects the host name portion of the URL but also the path within the URL 🙂 using the $S and $Q variables. A full reference on these variables can be found at – http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/41c238b2-1188-488f-bf2d-464383b1bb08.mspx?mfr=true


Thanks Brendan for sharing!

Leave a Reply

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