# Request configuration

The Request entry provides a powerful way to apply custom options to requests. It is a complement for the Directory and Extension entries. Basically, there are two differences between them:

- It uses regular expressions to define the requests in which the configuration will be applied.
- These entries are able to use the connection parameters (both, pathinfo and query string). In this way, it is possible to set rules based on parameter values.

### Examples

#### CGI with parameter

    Request "^/cgi-bin/example.pl\?op=modify.*" {
        Allow From 127.0.0.1
    }

It will only allow to call the example.pl with the modify value in its first parameter op if the connections comes from localhost.

#### Joining pyshical directories in a virtual one

    Directory /downloads {
        Handler file
    }

    Request "/downloads/.*\.iso" {
        DocumentRoot /mnt/bigdisk/isos/
    }

It is a nice trick. Let's imagine the virtual server document root is /var/www. The request of http://example.com/downloads/file.zip will access to /var/www/downloads/file.zip, but the request of http://example.com/downloads/debian.iso will access /mnt/bigdisk/isos/debian.iso.