This article contains information about setting up an HTTP to HTTPS redirection for a SharePoint site by using the AppExpert templates.
The AppExpert template available on a NetScaler appliance simplifies deploying the NetScaler appliance for specific applications by encapsulating everything about the appliance configuration that is specific to a given application.
In the procedure available in this article, it is assumed that you have successfully imported the AppExpert template and valid SharePoint responses are being received when going to the individual endpoints, such as on port 80 and 443.
To set up an HTTP to HTTPS redirection for a SharePoint site by using the AppExpert templates, complete the following procedure:
In the Navigation pane, expand the AppExpert node.
Click Applications.
In the Applications group, right-click SharePoint.
From the shortcut menu, select Add.
In the Name field of the Add Application Unit dialog box, type an appropriate name for the application unit.
In the Rule field, type URL == '/*'.
Click Create and thenĀ Close.
By default, the new application unit is added at the bottom of the application units. Select the application unit you have created and click Move Up to place the application unit at the top of the list.
To add a responder policy for the application unit, click in the Responder field of the application unit.
In the Configure Responder Policy dialog box, click Insert Policy.
From the Policy Name list, select New Policy.
In the Responder Policy dialog box, type an appropriate name for the policy.
In the expression field, type the following expression to ensure that if the client does not make an SSL connection, then the defined action should be taken:
!CLIENT.SSL.IS_SSL
Click New to create an action.
Specify an appropriate name for the action in the Configure Responder Acion dialog box.
From the Type list, select Redirect.
In the Target field, type the following expression:
"https://sharepoint07"+HTTP.REQ.URL
Select the Bypass Safety Check option.
Click Create > Close and then again Close.
Note: If the SharePoint application hosts a single site, then you can specify a static URL similar to the following URL as a target in the Responder action:
"https://www.<SharePoint_FQDN>.com" + HTTP.REQ.URL
Additionally, if the SharePoint application hosts multiple sites that are accessed by unique hostnames, you can use the following expression as a target in the Responder action:
"https://" + HTTP.REQ.HOSTNAME + HTTP.REQ.URL