Next: RIPE Extensions, Previous: Whois servers, Up: Top
The server-options block defines a number of parameters that are specific to each host.
The most commonly used option here is to redirect the query from the Internic shared whois server to the whois server of each individual registrar.
The value of the key whois-redirect should contain a regular expression which matches one or two string. If it matches one string, it will be treated as the hostname of a server to ask for more information. If it matches two strings, the first string will be treated as the hostname and the second as the port number.
The matching follows standard regular expressions and grouping
of regular expressions into one string is done by enclosing the
group in parentheses.
The value of this option is a simple string where the special characters `$*' will be replaced with the original query. If a query-format is specified both on an individual rule and on a server option, the query-format for the individual rule will be used since it is most specific.
For more advanced query rewrites, it is also possible to access subfields of the domain query. These subfields are counted from the left or the right, starting at 1 (one). To select the fields, the syntax `${start-end}' (left to right) or `${start+end}' (right to left). Either of the start or end fields can be omitted, and the two formats cannot be combined in one query. You can also select a single field (counting from the left) by using the format `${fieldnumber}'. To do this when counting from the right, you need to write `${fieldnumber+fieldnumber}'. Please note that the first field number is always the leftmost field, so the numerical values are swapped when counting right to left.
To include a verbatim `$' in the query, write `$$'.
You can use query-format also for HTTP based queries, but
it cannot be combined with http-action,
form-element or form-extra.
Examples:
server-options {
"rwhois\\.nic\\.ve" {
rwhois = true;
rwhois-display = "dump";
rwhois-limit = 10;
}
"whois\\.crsnic\\.net" {
whois-redirect = ".*Whois Server: \\(.*\\)";
}
"whois\\.ncst\\.ernet\\.in" {
query-format = "domain $*";
}
"www\\.nic-se\\.se" {
http = true;
http-method = "GET";
http-action = "/cgi-bin/whois/www-to-whois";
form-element = "domain";
}
}