SharePoint Tidbit - How to redirect sites for the breakup of a web application
Published May 15 2019 03:15 PM 563 Views

First published on TECHNET on Oct 02, 2017
Hello All,

I worked on figuring out what I believe is the best way to redirect Site Collections as my customer worked to break up a large Web Application.  I found many choices and they all have pros and cons, but I  am providing what I liked best.

Using URL Rewrite Module (See support statement https://support.microsoft.com/en-us/help/2818415/supportability-of-rewrites-and-redirects-in-sharep... )

    • Pro - No matter which page they try to hit in Site Collection they will be redirected

 

    • Pro - Works with Office and Browser

 

    • Pro - Flexible creation of rules

 

    • Pro - Can lock site or delete to insure that no one adds content in the wrong place and search results are clean

 

    • Con - Needs to be installed and configured on each WFE (Can be mitigated thru use of PowerShell or a single IIS server resource being used)



Steps to implement(Redirecting from http://sp2013app01/sites/horse to http://sp2013app01:27443/sites/horse :(

Using URL Rewrite

    1. Download and install URL Rewrite to all WFE from here https://docs.microsoft.com/en-us/iis/extensions/url-rewrite-module/using-the-url-rewrite-module#whe...

 

    1. Log onto each SharePoint server and create your rules, using the following:



- In IIS in Web Site double click on URL Rewrite

 

 

- Click on Add Rule then Blank Rule, and Ok

 

- Under 'Match Url' provide a pattern for IIS to catch using Regular expressions and ignoring the host name (See https://technet.microsoft.com/en-us/library/gg440701.aspx ) I used the value horse. *

 

 

- Create a condition to watch for a particular Web Application (or HTTP_HOST) I used the values {HTTP_HOST} and ^sp2013app01$

 

 

- Finally create an action I used the values Redirect and http://sp2013app01:27443/{REQUEST_URI} (See https://docs.microsoft.com/en-us/iis/extensions/url-rewrite-module/url-rewrite-module-configuration... for more info about REQUEST_URI)

 

 

- Perform IISReset or Disable then Enable the rule


Hope this helps someone else :)

Pax

Version history
Last update:
‎Apr 28 2020 03:25 PM
Updated by: