Direction | HTTP Header |
HTTP Request | • Host • Referer |
HTTP Redirect | • Location |
HTTP Response | • Location |
Settings | Guidelines |
Name | Configuration name. Valid characters are A-Z, a-z, 0-9, _, and -. No spaces. You reference this name in the virtual server configuration. Note: After you initially save the configuration, you cannot edit the name. |
Comments | A string to describe the purpose of the configuration, to help you and other administrators more easily identify its use. |
Action Type | Select whether to rewrite the HTTP request or HTTP response. |
HTTP Request Rewrite Actions | |
Rewrite HTTP Header | • Host—Rewrites the Host header by replacing the hostname with the string you specify. For Host rules, specify a replacement domain and/or port. • URL—Rewrites the request URL and Host header using the string you specify. For URL rules, specify a URL in one of the following formats: • Absolute URL — https://example.com/content/index.html • Relative URL — content/index.html If you specify a relative URL, the host header is not rewritten. • Referer—Rewrites the Referer header with the URL you specify. For Referer rules, you must specify an absolute URL. Note: The rewrite string is a literal string. Regular expression syntax is not supported. |
Redirect | Sends a redirect with the URL you specify in the HTTP Location header field. For Redirect rules, you must specify an absolute URL. For example: https://example.com/content/index.html Note: The rewrite string can be a literal string or a regular expression. |
Send 403 forbidden | Sends a 403 Forbidden response instead of forwarding the request. |
HTTP Response Rewrite Actions | |
Rewrite HTTP Location | Rewrites the Location header field in the server response. For Location rules, you must specify an absolute URL. For example: https://example.com/content/index.html Note: The rewrite string is a literal string. Regular expression syntax is not supported. |
Match Condition | |
Object | Select content matching conditions based on the following parameters: • HTTP Host Header • HTTP Location Header • HTTP Referer Header • HTTP Request URL • Source IP Address Note: When you add multiple conditions, FortiADC joins them with an AND operator. For example, if you specify both a HTTP Host Header and HTTP Request URL to match, the rule is a match only for traffic that meets both conditions. |
Type | • String • Regular Expression |
Content | Specify the string or PCRE syntax to match the header or IP address. |
Reverse | Rule matches if traffic does not match the expression. |