Netscaler Url/cookie Domain Transformation Conversion

Source: Internet
Author: User
Tags netscaler

Netscaler Url/cookie domain Transformation Conversion
We often encounter a lot of URL or cookie rewriting requirements, before the netscaler10.1 version can only be done by the more complex standard rewrite strategy, not only time-consuming but also error-prone. Subsequent versions deliberately compare this type of operation with frequent but not complex operations from rewrite to form transformation modules. The objects that can be converted include the request direction and the URL of the response direction (note that Hostname+uri can be changed, not just the path), the cookie domain, the compound regular expression can be used very flexible (if the feeling is not very written, you can refer to the NetScaler Data Index string map and pattern set "to facilitate enumeration is not too many parameters) in short, netscaler design is to meet the stability and functionality of the premise to try to make everyone's operation simple.

The profile is established under the rewrite strategy,

Create profile and fill in expressions that need to be converted

The converted objects can be request, Responde, and Cookie Domain, which can be either a URI or a full URL.

Then establish the URL transformation Policy


Bind this policy to the required VIPs


Observation Effect:
Before conversion

After conversion. Because there is no/111 this path on my server, I see the error proof that the conversion takes effect.

Official documents

How to change Destination Hostname of HTTP GET Request Using URL Transformation Feature
CTX128091 Created Onmay, Updated Onmay 07, 2014
1 found this helpful
Article topic:configuration
See Applicable products
Objective
This article provides information the the Destination Hostname of an HTTP GET Request using the URL Transform ation feature.

Instructions
The destination hostname of an HTTP GET request using the URL transformation feature of a NetScaler appliance, C Omplete the following procedure:

Run the following command from the command line interface of the appliance to create a URL transformation profile:

Add Transform Profile Prof_url_change

Run the following command to create a URL ransformation action:

Add transform action act_url_change prof_url_change 100

Run The following command to configure a URL transformation action:

Set transform action act_url_change-priority 100-requrlfrom "http://one.example.co.uk/(.) /(.) /"-requrlinto" http://$1.one.example.local/$2/"-resurlfrom" http://(. *). one.example.local/(. *) "-resurlinto" ://one.example.co.uk/$1/$2 "

The preceding command, the Requrlfrom section is regex-compliant. Therefore, you can create variables, such as $, based on word groups. You can use $ to $ variables for the Requrlinto parameter.
Note:the $ variable refers to the first (.), the $ variable refers to the second (.), and/is a delimiter.

Run The following command to configure the URL transformation policy:

Add transform Policy Pol_url_change "HTTP. REQ. Url. PATH. GET (1). EQ (\ "firstpath\") && HTTP. REQ. HOSTNAME. EQ (\ "One.example.co.uk\") "Prof_url_change

Run the following command to bind the policy globally to the appliance:

Bind Transform Global Pol_url_change 10

After configuring the appliance with the preceding configuration, if you try to access the HTTP://ONE.EXAMPLE.CO.UK/FIRSTP ath/secondpath/test.html URL, the appliance sends the http://firstpath.one.example.co.uk/secondpath/test.html URL to The backend server.

Note:in This article, the URL is transformed using the first element of the path. However, you can extend this to the other elements of the URL.

Source:

Netscaler Url/cookie Domain Transformation Conversion

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.