Show TOC

Procedure documentationFiltering Requests Locate this document in the navigation structure

 

With the operations RegForbiddenUrl, RegGoneUrl, RegIForbiddenUrl and RegIGoneUrl (the I in the name stands for the case insensitive pattern match) you can filter requests using the URL. The requests are not forwarded, the error forbidden is returned to the client.

Procedure

Use the operations in the action file. You can find a description of the syntax under Manipulating URLs.

With forbidden the HTTP OK code 403 is sent to the client, with gone the OK code 410 is sent to the client. The substitution expression has no affect on the response that is sent to the client, and therefore it is usually empty.

You can make further specifications for redirects using Conditions: Filtering can be restricted to specific clients, protocols, and times.

Example

The line

RegIForbiddenUrl ^/ping(.*)

rejects all requests beginning with /ping.

RegIGoneUrl ^/oldpath(.*) -

filters out all requests beginning with /oldpath. The client gets the message that this URL no longer exists.