Freigeben über


SharePoint 2010 URL Redirection and TMG

I was helping one of my customer with setting up the SharePoint public facing site on TMG and came-up with the following scenario and thought it might be useful for others:

Environment

  • SharePoint 2010 with SP2 ( 2 WFE + 1 APP)
  • TMG 2010

Scenario:

1. The SharePoint site published on TMG is https://www.contoso.org.au without any authentication, its just a public facing site.

2. There is another URL for accessing the same application using the https://www.contoso.gov.au ( Extended long back). this rule is published in TMG too.

3. At the moment user can access the application using both the URLs: https://www.contoso.org.au and https://www.contoso.gov.au and all the request go via TMG to SharePoint.

4. Here is alternate access mappings for the application on SharePoint:

https://www.contoso.org.au --> Default -->https://www.contoso.org.au

https://www.contoso.gov.au --> Custom -->https://www.contoso.gov.au

Requirement:

The requirement is to change the existing setup:

 

  1. Users Typing www.contoso.gov.au in the browser takes you to www.contoso.org.au
  2. Users Typing contoso.gov.au in the browser takes you to www.contoso.org.au
  3. Users Typing contoso.org.au in the browser takes you to www.contoso.org.au

Solution:

SharePoint AAM

1. Removed the https://www.contoso.gov.au from the public URL and IIS host headers on IIS for this site.

2. Added the following redirection on SharePoint AAM:

https://www.contoso.gov.au –>  Internal URL –> https://www.contoso.org.au

3. Added the following redirection on SharePoint AAM:

https://contoso.org.au –> Internal URL –> https://www.contoso.org.au

https://contoso.gov.au –> Internal URL –> https://www.contoso.org.au

IIS Server ( SharePoint)

Create a website on SharePoint server for redirection:

1. Created a simple IIS site called “Redirect – GOV.AU” on the SharePoint server

2. Added the following Bindings with the new IP address:

3. Configured the HTTP redirect:
image

4. Modified the TMG listener to map to the new IP ( Bindings).

5. Tested and everything worked as expected!!!

Hope that helps!

Cheers,

 

Bala