One of the biggest annoyances of NetScaler admins is when people use down vServers to do redirects. The reason that it is annoying is because it permanently marks the service as down (read: RED status) which inevitably always leads to questions as to why it was configured with something marked down. There is a better way to perform HTTP to HTTPS redirects on NetScaler. The general idea is we create a responder action and policy and then a dummy monitor and service within the Load Balancing tab. Then we create a LB vServer on port 80 with the same IP address as the HTTPS site that we want redirect HTTP requests to and bind the policy and service to it.

  1. Click on the Responder tab and click on the actions menu
  2. Click Add to create a new responder policy and give it an appropriate name
  3. In the type list select REDIRECT and within the target field type the following: “https://” + HTTP.REQ.HOSTNAME.HTTP_URL_SAFE + HTTP.REQ.URL.PATH_AND_QUERY.HTTP_URL_SAFE
  4. By default the Bypass safety check should be unticked but just check it and make sure it is unticked then click the CREATE button.
  5. Click on responder policy and click CREATE.
  6. Name the policy something appropriate and from the Action dropbox select the responder action you have just created.
  7. Within the Undefined action list select reset.
  8. Within the expression box type HTTP.REQ.IS_VALID.

2 Comments

Comments are closed