Home
%3CLINGO-SUB%20id%3D%22lingo-sub-571623%22%20slang%3D%22en-US%22%3ESharePoint%20Tidbit%20-%20How%20to%20redirect%20sites%20for%20the%20breakup%20of%20a%20web%20application%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-571623%22%20slang%3D%22en-US%22%3E%0A%20%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3DUTF-8%22%20%2F%26gt%3B%3CSTRONG%3EFirst%20published%20on%20TECHNET%20on%20Oct%2002%2C%202017%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%20Hello%20All%2C%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20I%20worked%20on%20figuring%20out%20what%20I%20believe%20is%20the%20best%20way%20to%20redirect%20Site%20Collections%20as%20my%20customer%20worked%20to%20break%20up%20a%20large%20Web%20Application.%26nbsp%3B%20I%20found%20many%20choices%20and%20they%20all%20have%20pros%20and%20cons%2C%20but%20I%26nbsp%3B%20am%20providing%20what%20I%20liked%20best.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20Using%20URL%20Rewrite%20Module%20(See%20support%20statement%20%3CA%20href%3D%22https%3A%2F%2Fsupport.microsoft.com%2Fen-us%2Fhelp%2F2818415%2Fsupportability-of-rewrites-and-redirects-in-sharepoint-2013--2010--and%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20https%3A%2F%2Fsupport.microsoft.com%2Fen-us%2Fhelp%2F2818415%2Fsupportability-of-rewrites-and-redirects-in-sharepoint-2013--2010--and%20%3C%2FA%3E%20)%20%3CBR%20%2F%3E%3CUL%3E%3CBR%20%2F%3E%3CLI%3EPro%20-%20No%20matter%20which%20page%20they%20try%20to%20hit%20in%20Site%20Collection%20they%20will%20be%20redirected%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EPro%20-%20Works%20with%20Office%20and%20Browser%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EPro%20-%20Flexible%20creation%20of%20rules%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EPro%20-%20Can%20lock%20site%20or%20delete%20to%20insure%20that%20no%20one%20adds%20content%20in%20the%20wrong%20place%20and%20search%20results%20are%20clean%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3ECon%20-%20Needs%20to%20be%20installed%20and%20configured%20on%20each%20WFE%20(Can%20be%20mitigated%20thru%20use%20of%20PowerShell%20or%20a%20single%20IIS%20server%20resource%20being%20used)%3C%2FLI%3E%3CBR%20%2F%3E%3C%2FUL%3E%3CBR%20%2F%3E%20Steps%20to%20implement(Redirecting%20from%20%3CA%20href%3D%22http%3A%2F%2Fsp2013app01%2Fsites%2Fhorse%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%20http%3A%2F%2Fsp2013app01%2Fsites%2Fhorse%20%3C%2FA%3E%20to%20%3CA%20href%3D%22http%3A%2F%2Fsp2013app01%3A27443%2Fsites%2Fhorse%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%20http%3A%2F%2Fsp2013app01%3A27443%2Fsites%2Fhorse%20%3C%2FA%3E%20%3A(%3C%2Fimg%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20Using%20URL%20Rewrite%20%3CBR%20%2F%3E%3COL%3E%3CBR%20%2F%3E%3CLI%3EDownload%20and%20install%20URL%20Rewrite%20to%20all%20WFE%20from%20here%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fiis%2Fextensions%2Furl-rewrite-module%2Fusing-the-url-rewrite-module%23where-to-get-the-url-rewrite-module%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fiis%2Fextensions%2Furl-rewrite-module%2Fusing-the-url-rewrite-module%23where-to-get-the-url-rewrite-module%3C%2FA%3E%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3ELog%20onto%20each%20SharePoint%20server%20and%20create%20your%20rules%2C%20using%20the%20following%3A%3C%2FLI%3E%3CBR%20%2F%3E%3C%2FOL%3E%3CBR%20%2F%3E%3CP%3E-%20In%20IIS%20in%20Web%20Site%20double%20click%20on%20URL%20Rewrite%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F113611i3796458A9CF1A1AE%22%20%2F%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E-%20Click%20on%20Add%20Rule%20then%20Blank%20Rule%2C%20and%20Ok%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E-%20Under%20'Match%20Url'%20provide%20a%20pattern%20for%20IIS%20to%20catch%20using%20Regular%20expressions%20and%20ignoring%20the%20host%20name%20(See%20%3CA%20href%3D%22https%3A%2F%2Ftechnet.microsoft.com%2Fen-us%2Flibrary%2Fgg440701.aspx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20https%3A%2F%2Ftechnet.microsoft.com%2Fen-us%2Flibrary%2Fgg440701.aspx%20%3C%2FA%3E%20)%20I%20used%20the%20value%20horse.%20%3CEM%3E%20*%20%3C%2FEM%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F113612i8764314FAEE88461%22%20%2F%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CEM%3E-%20%3C%2FEM%3E%20Create%20a%20condition%20to%20watch%20for%20a%20particular%20Web%20Application%20(or%20HTTP_HOST)%20I%20used%20the%20values%20%3CEM%3E%20%7BHTTP_HOST%7D%20and%20%5Esp2013app01%24%3C%2FEM%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F113613iBD0E91C3E4233A1F%22%20%2F%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E-%20Finally%20create%20an%20action%20I%20used%20the%20values%20Redirect%20and%20%3CA%20href%3D%22http%3A%2F%2Fsp2013app01%3A27443%2F%257bREQUEST_URI%257d%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%20http%3A%2F%2Fsp2013app01%3A27443%2F%7BREQUEST_URI%7D%20%3C%2FA%3E%20(See%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fiis%2Fextensions%2Furl-rewrite-module%2Furl-rewrite-module-configuration-reference%23Accessing_URL_Parts_from_a_Rewrite_Rule%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fiis%2Fextensions%2Furl-rewrite-module%2Furl-rewrite-module-configuration-reference%23Accessing_URL_Parts_from_a_Rewrite_Rule%20%3C%2FA%3E%20for%20more%20info%20about%20REQUEST_URI)%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F113614i3332899741CC0478%22%20%2F%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E-%20Perform%20IISReset%20or%20Disable%20then%20Enable%20the%20rule%3C%2FP%3E%3CBR%20%2F%3E%20Hope%20this%20helps%20someone%20else%20%3A)%3C%2Fimg%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20Pax%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-571623%22%20slang%3D%22en-US%22%3EFirst%20published%20on%20TECHNET%20on%20Oct%2002%2C%202017%20Hello%20All%2CI%20worked%20on%20figuring%20out%20what%20I%20believe%20is%20the%20best%20way%20to%20redirect%20Site%20Collections%20as%20my%20customer%20worked%20to%20break%20up%20a%20large%20Web%20Application.%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-571623%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3Ebreakup%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMigration%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Eredirect%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Eseperate%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EWebApp%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
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-sha... )

  • 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-modul...

  2. 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-configura... for more info about REQUEST_URI)



- Perform IISReset or Disable then Enable the rule


Hope this helps someone else :)

Pax