A user might attempt to access a secure Web site by sending an HTTP request. Instead of dropping the request, you might want to redirect the request to the secure Web site. You can use the Responder feature of the NetScaler appliance to redirect a HTTP request to the secure Web site without changing the path and query of the URL that the user attempts to access.
Complete the following procedure to redirect an HTTP request to an HTTPS server and retain the path and query in the URL:
Create a Responder action to hostname, path, and query of the URL:
add responder action rdr_new redirect "\"https://\"+http.REQ.HEADER(\"Host\").HTTP_HEADER_SAFE+http.REQ.URL.PATH_AND_QUERY.HTTP_URL_SAFE"
Run the following command to create responder action to check the hostname of the URL:
add responder policy redr_pol "http.REQ.HOSTNAME.EQ(\"example.com\") && client.TCP.DSTPORT.EQ(80)" rdr_new
Run the following command to set the undefined action parameter for the Responder feature:
set responder param -undefAction NOOP
Bind the policy at an appropriate bind point, such as globally or a virtual server.