Location matching

The location match contains protocol, host, port and path fields that may be used to match the URL of the request. Any of the fields may be left blank, in which case they will match any value.

Wildcards

Wildcards are supported using either *, ? or character ranges [...]. The * matches zero or more characters. The ? matches one character. Character ranges match one character in the range, eg. [a-z] or [aeiou].

Paths

If you specify a path and end it with a / it will match files and subpaths (using an implicit * after the /). You can add a $ after the / to indicate that you want to match that path exactly.

Common Uses

To match every request to a given host enter the host name and leave the other fields blank. To match every request to a given path on a host enter the host name and the path ending with a /, leave the other fields blank. To match every file with a given suffix on a host enter the host name and /*.suffix, leave the other fields blank.

Examples

Host Path Result
xk72.com Matches all requests to host xk72.com
*.xk72.com Matches all requests to hosts ending in .xk72.com
xk72.com /charles/ Matches all requests to xk72.com/charles/ including files and subpaths
xk72.com /charles Matches all requests to xk72.com/charles only
xk72.com /index.php Matches all requests to xk72.com/charles.php only
xk72.com /*.php Matches all requests to files ending in .php on host xk72.com
/charles/*.php Matches all requests to files ending in .php under the path /charles/ on any host

Protocol and port matches can be added to the above to further narrow the location match.