Citrix

How to Redirect an HTTP Request to an HTTPS Server and Retain the Path and Query of the URL

  • CTX121490
  • Created onMar 26, 2014
  • Updated onMay 22, 2014
Article Topic Security

Objective

This article describes how to redirect an HTTP request to an HTTPS server and retain the path and query of the URL.

Background

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.

Instructions

Complete the following procedure to redirect an HTTP request to an HTTPS server and retain the path and query in the URL:

  1. 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"

  2. 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

  3. Run the following command to set the undefined action parameter for the Responder feature:

    set responder param -undefAction NOOP

  4. Bind the policy at an appropriate bind point, such as globally or a virtual server.

Applicable Products

Automatic translation

Important: This article was translated by an automatic translation system (also referred to as Machine Translation, or MT) and has not been translated or reviewed by people. Citrix offers a machine translated version of this article to allow for greater access to the support content. However, automatic translation is not always perfect and may contain errors of vocabulary, syntax or grammar. Citrix is not responsible for inconsistencies, errors or damage incurred as a result of the use of MT articles from our customers.Thank you.
Click here to see the English version of this article.
Languages
Was this helpful?
Thank you for your feedback

Share your comments or find out more about this topic

Citrix Forums