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
- In the search field, enter URL.
- From the search results, click URL Rewrite Policy.
- Click Add or
New.
- Define the basic properties: Name, administrative state, and
descriptive summary.
- From the URL Rewrite Direction list,
select the direction of the URL rewrite policy.
- Click the URL Rewrite Rule tab.
- Define a rewrite rule.
- Click Add or
New.
- From the URL Rewrite Type list,
select the type of rewrite rule to define.
- In the Match Expression field,
enter the expression that triggers the rewrite rule.
- In the Input Replace Expression field,
enter the replacement expression that defines the rewritten URL, HTTP
header field, or HTTP POST body.
- 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.
- 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.
- 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.
- In the Header Name field, enter
the name of the header.
This property is meaningful for
HTTP header rewrites.
- Use URL Normalization to control
whether to enable normalization of URL strings.
URL normalization
compresses "." and ".." and converts \ to /.
- Click Apply.
- Optional: Repeat the previous step to define
another rewrite rule.
- Click Apply to save the changes to the running
configuration.
- Click Save Configuration or Save
changes to save the changes to the persisted configuration.