How to Use URL Transformation to Rewrite and Proxy Requests

  • CTX124732
  • Created onMar 26, 2014
  • Updated onSep 19, 2014
Article Topic Networking


This article describes how to use URL transformation to rewrite and proxy requests.


The rewrite/proxy function in Apache can be used to funnel requests to a host from a different domain, and change it to appear as if it is coming from the same host. One of the practical application of this feature is when you have content being pulled from different locations, and javascripts are being used, the browser might not allow it to prevent cross-site scripting attacks. It is possible to use the NetScaler appliance to emulate the rewrite/proxy function in Apache.


For this function to work properly, the rewrite and content switching functions must be enabled on the NetScaler appliance. The appliance must be installed with NetScaler software release 9.0 or later to take advantage of the URL transform feature.


To implement the same function as the Apache rewrite rule use the following procedure.

RewriteRule ^*)$1 [P,L]

This procedure takes incoming request for, identified by the /key/ directory, and rewrites them to host, removing the /key/ directory.

  1. Define a content switching virtual server which routes the incoming request to the IP of

  2. Configure the URL transformation as fol