KnowledgeLayer

Search form

Main menu

You are here

URL Redirection Netscaler VPX

The most common way to perform a http:// -> https:// redirect in NetScaler is to take advantage of the backup/redirect feature, which was originally intended to redirect to a “server down” or “maintenance” page. To do this, you create a LB vserver listening on port 80, with no actual services bound to it, and a back-up redirect to a specific https:// URL. The actual vserver is always “down” (no live services bound), and therefore the back-up redirect is always active. The good thing about this method is that it is easy and straightforward to configure via the GUI. The drawback is that you must specify an explicit redirect URL (e.g. https://web.example.com), and as a result users attempting to access http://mail.example.com would get redirected to https://web.example.com.

An alternative method for performing a redirect for http:// to https://, while retaining the hostname/URL, uses the “responder” feature of NetScaler, which crafts a HTTP redirect message including the original information. This is done in a few easy steps – in the below example be sure to replace “w.x.y.z” with the IP address of the https VIP:

Prepare a monitor type which will always succeed (pinging localhost will always be online as long as the NetScaler is up)

Add lb monitor localhost_ping PING -LRTM ENABLED -destIP 127.0.0.1

Define a fake service with an IP that will never be used (IP address for a server at 1.1.1.1 which will never be online)

Substitute the IP address w.x.y.z for the URL hostname, e.g. http://mail.example.com or http://web.example.com and confirm that the “Location” output reflects the same hostname which was initially specified, but starting with “https” per the below examples: