Incoming HTTP requests can be filtered before they are forwarded to the application server. Filtered URLs are not passed to the application server. HTTP status code 403 (forbidden) or 410 (gone) is returned to the HTTP client of the HTTP request.
A line in the action file describes precisely one modification action. The sequence in the action file defines the sequence of execution too. You can define multiple URL filters consecutively in the action file. If an HTTP request is filtered, the execution of the modification actions in the action file stops. You can link the execution of URL modifications to one or more conditions. For example, you can restrict URL filters to specific clients, protocols, times, etc.
Use the following syntax to define a URL redirect in the action file:
<operation> <pattern> <dest> [<option>]
The operation is case-insensitive.
Explanation of the Syntax
<operation> |
|
<pattern> |
Pattern used for the comparison. If the pattern matches, the appropriate HTTP status code (gone or fobidden) is returned to the HTTP client. |
<dest> |
The replacement expression does not affect the response sent to the HTTP client. Specify one " - " (minus sign). |
[<option>] |
You can specify multiple options consecutively; you separate them using commas. The use of compound (grouping of single modification actions into one block) and skip (skipping modification actions) is no longer recommended. |
Example A:
Excerpt from the Action File:
RegIForbiddenUrl ^/ping(.*) -
If a pattern match is successful (all HTTP requests start with /ping; case-insensitive), the HTTP request is rejected.
Example B:
Excerpt from the Action File:
RegIGoneUrl ^/oldpath(.*) -
If a pattern match is successful, (HTTP request begins with /oldpath), a message stating that this URL no longer exists is sent to the HTTP client.