-
Getting Started with Citrix ADC
-
Deploy a Citrix ADC VPX instance
-
Install a Citrix ADC VPX instance on Microsoft Hyper-V servers
-
Install a Citrix ADC VPX instance on Linux-KVM platform
-
Prerequisites for Installing Citrix ADC VPX Virtual Appliances on Linux-KVM Platform
-
Provisioning the Citrix ADC Virtual Appliance by using OpenStack
-
Provisioning the Citrix ADC Virtual Appliance by using the Virtual Machine Manager
-
Configuring Citrix ADC Virtual Appliances to Use SR-IOV Network Interface
-
Configuring Citrix ADC Virtual Appliances to use PCI Passthrough Network Interface
-
Provisioning the Citrix ADC Virtual Appliance by using the virsh Program
-
Provisioning the Citrix ADC Virtual Appliance with SR-IOV, on OpenStack
-
Configuring a Citrix ADC VPX Instance on KVM to Use OVS DPDK-Based Host Interfaces
-
-
Deploy a Citrix ADC VPX instance on Microsoft Azure
-
Network architecture for Citrix ADC VPX instances on Microsoft Azure
-
Configure multiple IP addresses for a Citrix ADC VPX standalone instance
-
Configure a high-availability setup with multiple IP addresses and NICs
-
Configure a high-availability setup with multiple IP addresses and NICs by using PowerShell commands
-
Configure HA-INC nodes by using the Citrix high availability template with Azure ILB
-
Configure address pools (IIP) for a Citrix Gateway appliance
-
-
Upgrade and downgrade a Citrix ADC appliance
-
Solutions for Telecom Service Providers
-
Load Balance Control-Plane Traffic that is based on Diameter, SIP, and SMPP Protocols
-
Provide Subscriber Load Distribution Using GSLB Across Core-Networks of a Telecom Service Provider
-
Authentication, authorization, and auditing application traffic
-
Configuring authentication, authorization, and auditing policies
-
Configuring Authentication, authorization, and auditing with commonly used protocols
-
Use an on-premises Citrix Gateway as the identity provider for Citrix Cloud
-
Troubleshoot authentication issues in Citrix ADC and Citrix Gateway with aaad.debug module
-
-
-
Advanced Policy Expressions: Working with Dates, Times, and Numbers
-
Advanced Policy Expressions: Parsing HTTP, TCP, and UDP Data
-
Advanced Policy Expressions: IP and MAC Addresses, Throughput, VLAN IDs
-
Tutorial Examples of Default Syntax Policies for Rewrite
-
-
-
-
-
-
-
-
Persistence and persistent connections
-
Advanced load balancing settings
-
Gradually stepping up the load on a new service with virtual server–level slow start
-
Protect applications on protected servers against traffic surges
-
Retrieve location details from user IP address using geolocation database
-
Use source IP address of the client when connecting to the server
-
Use client source IP address for backend communication in a v4-v6 load balancing configuration
-
Set a limit on number of requests per connection to the server
-
Configure automatic state transition based on percentage health of bound services
-
-
Use case 2: Configure rule based persistence based on a name-value pair in a TCP byte stream
-
Use case 3: Configure load balancing in direct server return mode
-
Use case 6: Configure load balancing in DSR mode for IPv6 networks by using the TOS field
-
Use case 7: Configure load balancing in DSR mode by using IP Over IP
-
Use case 10: Load balancing of intrusion detection system servers
-
Use case 11: Isolating network traffic using listen policies
-
Use case 14: ShareFile wizard for load balancing Citrix ShareFile
-
-
-
-
-
Authentication and authorization
-
-
Configuring a CloudBridge Connector Tunnel between two Datacenters
-
Configuring CloudBridge Connector between Datacenter and AWS Cloud
-
Configuring a CloudBridge Connector Tunnel Between a Datacenter and Azure Cloud
-
Configuring CloudBridge Connector Tunnel between Datacenter and SoftLayer Enterprise Cloud
-
Configuring a CloudBridge Connector Tunnel Between a Citrix ADC Appliance and Cisco IOS Device
-
CloudBridge Connector Tunnel Diagnostics and Troubleshooting
-
-
Synchronizing Configuration Files in a High Availability Setup
-
Restricting High-Availability Synchronization Traffic to a VLAN
-
Understanding the High Availability Health Check Computation
-
Managing High Availability Heartbeat Messages on a Citrix ADC Appliance
-
Remove and Replace a Citrix ADC in a High Availability Setup
This content has been machine translated dynamically.
Dieser Inhalt ist eine maschinelle Übersetzung, die dynamisch erstellt wurde. (Haftungsausschluss)
Cet article a été traduit automatiquement de manière dynamique. (Clause de non responsabilité)
Este artículo lo ha traducido una máquina de forma dinámica. (Aviso legal)
此内容已动态机器翻译。 放弃
このコンテンツは動的に機械翻訳されています。免責事項
This content has been machine translated dynamically.
This content has been machine translated dynamically.
This content has been machine translated dynamically.
This article has been machine translated.
Dieser Artikel wurde maschinell übersetzt. (Haftungsausschluss)
Ce article a été traduit automatiquement. (Clause de non responsabilité)
Este artículo ha sido traducido automáticamente. (Aviso legal)
この記事は機械翻訳されています.免責事項
이 기사는 기계 번역되었습니다.
Este artigo foi traduzido automaticamente.
这篇文章已经过机器翻译.放弃
Translation failed!
Tutorial examples of default syntax policies for rewrite
With the rewrite feature, you can modify any part of an HTTP header, and, for responses, you can modify the HTTP body. You can use this feature to accomplish a number of useful tasks, such as removing unnecessary HTTP headers, masking internal URLs, redirecting Web pages, and redirecting queries or keywords.
In the following examples, you first create a rewrite action and a rewrite policy. Then you bind the policy globally.
This document includes the following details:
- Redirecting an External URL to an Internal URL
- Redirecting a Query
- Rewriting HTTP to HTTPS
- Removing Unwanted Headers
- Reducing Web Server Redirects
- Masking the Server Header
- Converting plain text to URL encoded string and vice-versa
For more information about the commands and syntax descriptions, see Rewrite Command Reference page.
Redirecting an external URL to an internal URL
This example describes how to create a rewrite action and rewrite policy that redirects an external URL to an internal URL. You create an action, called act_external_to_internal, that performs the rewrite. Then you create a policy called pol_external_to_internal.
To redirect an external URL to an internal URL by using the command line interface
- To create the rewrite action, at the command prompt, type:
add rewrite action act_external_to_internal REPLACE "http.req.hostname.server" "host_name_of_internal_Web_server"
- To create the rewrite policy, at the Citrix ADC command prompt, type:
add rewrite policy pol_external_to_internal "http.req.hostname.server.eq("host_name_of_external_Web_server") act_external_to_internal"
- Bind the policy globally.
To redirect an external URL to an internal URL by using the configuration utility
- Navigate to AppExpert > Rewrite > Actions.
- In the details pane, click Add.
- In the Create Rewrite Action dialog box, enter the name act_external_to_internal.
- To replace the HTTP server host name with the internal server name, choose Replace from the Type list box.
- In the header name field, type Host.
- In the string expression for replacement text field, type the internal host name of your Web server.
- Click Create and then click Close.
- In the navigation pane, click Policies.
- In the details pane, click Add.
- In the Name field, type pol_external_to_internal. This policy will detect connections to the Web server.
- In the Action drop-down menu, choose the action act_external_to_internal.
- In the Expression editor, construct the following expression:
HTTP.REQ.HOSTNAME.SERVER.EQ("www.example.com")
- Bind your new policy globally.
Redirecting a query
This example describes how to create a rewrite action and rewrite policy that redirects a query to the proper URL. The example assumes that the request contains a Host header set to www.example.com and a GET method with the string /query.cgi?server=5. The redirect extracts the domain name from the host header and the number from the query string, and redirects the user’s query to the server Web5.example.com, where the rest of the user’s query is processed.
Note: Although the following commands appears on multiple lines, you should enter them on a single line without line breaks.
To redirect a query to the appropriate URL using the command line
- To create a rewrite action named act_redirect_query that replaces the HTTP server host name with the internal server name, type:
add rewrite action act_redirect_query REPLACE q#http.req.header("Host").before_str(".example.com")' '"Web" + http.req.url.query.value("server")#
- To create a rewrite policy named pol_redirect_query, type the following commands at the Citrix ADC command prompt.. This policy detects connections, to the Web server, that contain a query string. Do not apply this policy to connections that do not contain a query string:
add rewrite policy pol_redirect_query q#http.req.header("Host").eq("www.example.com") && http.req.url.contains("?")' act_redirect_query#
- Bind your new policy globally.
Because this rewrite policy is highly specific and should be run before any other rewrite policies, it is advisable to assign it a high priority. If you assign it a priority of 1, it will be evaluated first.
Rewriting HTTP to HTTPS
This example describes how to rewrite Web server responses to find all URLs that begin with the string “http” and replace that string with “https.” You can use this to avoid having to update Web pages after moving a server from HTTP to HTTPS.
To redirect HTTP URLs to HTTPS by using the command line interface
- To create a rewrite action named act_replace_http_with_https that replaces all instances of the string “http” with the string “https,” enter the following command:
add rewrite action act_replace_http_with_https replace_all 'http.res.body(100)' '"https"' -pattern http
- To create a rewrite policy named pol_replace_http_with_https that detects connections to the Web server, enter the following command:
add rewrite policy pol_replace_http_with_https TRUE act_replace_http_with_https NOREWRITE
- Bind your new policy globally.
To troubleshoot this rewrite operation, see “Case Study: Rewrite Policy for Converting HTTP Links to HTTPS not Working.”
Removing Unwanted Headers
This example explains how to use a Rewrite policy to remove unwanted headers. Specifically, the example shows how to remove the following headers:
- Accept Encoding header. Removing the Accept Encoding header from HTTP responses prevents compression of the response.
- Content Location header. Removing the Content Location header from HTTP responses prevents your server from providing a hacker with information that might allow a security breach.
To delete headers from HTTP responses, you create a rewrite action and a rewrite policy, and you bind the policy globally.
To create the appropriate Rewrite action by using the command line interface
At the command prompt, type one of the following commands to either remove the Accept Encoding header and prevent response compression or remove the Content Location header:
add rewrite action "act_remove-ae" delete_http_header "Accept-Encoding"
add rewrite action "act_remove-cl" delete_http_header "Content-Location"
To create the appropriate Rewrite policy by using the command line interface
At the command prompt, type one of the following commands to remove either the Accept Encoding header or the Content Location header:
add rewrite policy "pol_remove-ae" true "act_remove-ae"
add rewrite policy "pol_remove-cl" true "act_remove-cl"
To bind the policy globally by using the command line interface
At the command prompt, type one of the following commands, as appropriate, to globally bind the policy that you have created:
bind rewrite global pol_remove_ae 100
bind rewrite global pol_remove_cl 200
Reducing Web Server Redirects
This example explains how to use a Rewrite policy to modify connections to your home page and other URLs that end with a forward slash (/) to the default index page for your server, preventing redirects and reducing load on your server.
To modify directory-level HTTP requests to include the default home page by using the command line
- To create a Rewrite action named action-default-homepage that modifies URLs that end in a forward slash to include the default home page index.html, type:
add rewrite action "action-default-homepage" replace q\#http.req.url.path "/" "/index.html"\#
- To create a Rewrite policy named policy-default-homepage that detects connections to your home page and applies your new action, type:
add rewrite policy "policy-default-homepage" q\#http.req.url.path.EQ("/") "action-default-homepage"\#
- Globally bind your new policy to put it into effect.
Masking the Server Header
This example explains how to use a Rewrite policy to mask the information in the Server header in HTTP responses from your Web server. That header contains information that hackers can use to compromise your Web site. While masking the header will not prevent a skilled hacker from finding out information about your server, it will make hacking your Web server more difficult and encourage hackers to choose less well protected targets.
To mask the Server header in responses from the command line
- To create a Rewrite action named act_mask-server that replaces the contents of the Server header with an uninformative string, type:
add rewrite action "act_mask-server" replace "http.RES.HEADER(\\"Server\\")" "\\"Web Server 1.0\\""
- To create a Rewrite policy named pol_mask-server that detects all connections, type:
add rewrite policy "pol_mask-server" true "act_mask-server"
- Globally bind your new policy to put it into effect.
How to convert plain text to URL encoded string and vice-versa
The following expressions convert plain text to URL encoded string and vice-versa:
- URL_RESERVED_CHARS_SAFE (string to URL ENCODED).
Example:
("abc def&123").URL_RESERVED_CHARS_SAFE
Output will be
“abc%20def%26123” which is url encoded.
- SET_TEXT_MODE(URLENCODED).DECODE_USING_TEXT_MODE. (URL ENCODED to string)
Example:
("abc%20def%26123").SET_TEXT_MODE(URLENCODED).DECODE_USING_TEXT_MODE
Output will be
“abc def&123”
Share
Share
This Preview product documentation is Citrix Confidential.
You agree to hold this documentation confidential pursuant to the terms of your Citrix Beta/Tech Preview Agreement.
The development, release and timing of any features or functionality described in the Preview documentation remains at our sole discretion and are subject to change without notice or consultation.
The documentation is for informational purposes only and is not a commitment, promise or legal obligation to deliver any material, code or functionality and should not be relied upon in making Citrix product purchase decisions.
If you do not agree, select Do Not Agree to exit.