This article describes how to rewrite an HTTP request http://xyx.com as http://www.xyz.com and then to https://www.xyz.com.
1. Enable Responder Feature on NetScaler using the following command:
enable ns feature Responder
2. Create a Responder Action using the following command:
add responder action HTTP_TO_HTTPS_HOSTNAME redirect "\"https://\"+\"www.\"+HTTP.REQ.HOSTNAME.HTTP_URL_SAFE" -responseStatusCode 302
3. Configure Responder Policy using the following command:
add responder policy HTTP_TO_HTTPS_HOSTNAME_POLICY "HTTP.REQ.HOSTNAME.CONTAINS(\"www\").NOT" HTTP_TO_HTTPS_HOSTNAME
4. Bind the responder policy to your existing HTTP vServer:
bind lb vserver Your_HTTP_LB_vS -policyName HTTP_TO_HTTPS_HOSTNAME_POLICY -priority 100
For more information, please see How to redirect HTTP request to HTTPS using responder