Creating a URL rewrite policy

Create a URL rewrite policy to define the direction for the rewrite policy and the rewrite rules for the policy.

About this task

Direction or a rewrite rule is applied at the service level and has no effect on other policies. You can apply rewrite rules to a URL, an HTTP header field, or an HTTP POST body.

Procedure

  1. In the search field, enter URL.
  2. From the search results, click URL Rewrite Policy.
  3. Click Add or New.
  4. Define the basic properties: Name, administrative state, and descriptive summary.
  5. From the URL Rewrite Direction list, select the direction of the URL rewrite policy.
  6. Click the URL Rewrite Rule tab.
  7. Define a rewrite rule.
    1. Click Add or New.
    2. From the URL Rewrite Type list, select the type of rewrite rule to define.
    3. In the Match Expression field, enter the expression that triggers the rewrite rule.
    4. In the Input Replace Expression field, enter the replacement expression that defines the rewritten URL, HTTP header field, or HTTP POST body.
    5. In the Stylesheet Replace Expression field, enter the replacement expression that identifies the replacement stylesheet for the rewritten URL or HTTP POST body.
      This property is meaningful for URL or HTTP POST body rewrites.
    6. Use Input URL Unescape to control whether to replace URL-encoded characters with literal character equivalents.
      This property is meaningful for URL or HTTP POST body rewrites.
    7. Use Stylesheet URL Unescape to control whether to replace URL-encoded characters with literal character equivalents.
      This property is meaningful for URL or HTTP POST body rewrites.
    8. In the Header Name field, enter the name of the header.
      This property is meaningful for HTTP header rewrites.
    9. Use URL Normalization to control whether to enable normalization of URL strings.
      URL normalization compresses "." and ".." and converts \ to /.
    10. Click Apply.
  8. Optional: Repeat the previous step to define another rewrite rule.
  9. Click Apply to save the changes to the running configuration.
  10. Click Save Configuration or Save changes to save the changes to the persisted configuration.