Editing Paths
Configuring paths is optional. It enables you to handle individual subdirectories or file types differently (see also Application Mapping, Paths, Preconditions).
The order of paths is important
The decider processes the list of paths from top to bottom. When a URL matches a defined path and all set up preconditions for this path are met (if preconditions have been set up at all), vWAF calls the handlers stored for that path for analyzing the request. Then it aborts. So if there are other path matches further down the list, these matches are not taken into account.
The order of the paths in the created list may therefore influence how vWAF behaves.
Duplicate paths when using preconditions
If you’re using preconditions, you can create a duplicate of a path and only define preconditions for one of the two instances of that path. This allows you to handle the path differently, depending on whether or not the preconditions are met.
Examples
Paths are interpreted as regular expressions (for details on the syntax, see Regular Expressions). Depending on the web application, it can be useful to create separate paths for specific directories or for specific file types.
Example
- /.* for all URLs (“catch all” rule); this path is already present by default
- /cgi-bin/.* for all installed CGI programs
- /.*\.php for all PHP scripts
- /download/.* for the download directory and all of its subdirectories
Creating a path
Editing a path
Moving a path
To move a path to another position within the list, click the arrow symbols in the Order column.
Deleting a path
- In the navigation area, select the application for which you want to delete a path.
- Activate the Ruleset Config | Path tab.
- In the Action column, click the relevant Delete icon for the path that you want to delete.
Using search
The regular expressions for defining paths can be quite simple but also highly complex. For testing which path matches a particular URL, you can use the search filed above the list of your paths. To do so, just enter the URL into the search field. The matching path is automatically highlighted. (You don’t have to click any submit button.)
Note that the order of paths is important. vWAF always processes them from top to bottom. The first match wins.
Look at the following example:
Path /path01 isn’t used because the “catch-all” path.* already matches before.
The match changes if you switch positions: