To deny HTTP keep-alive requests for a specific server class (while still honoring keep-alive requests for the other classes), add this AuthTrans directive to the obj.conf for the server class, and set the variable keep-alive to disabled:
AuthTrans fn="set-variable" keep-alive="disabled"
To set the same server class to use HTTP/1.0 while the rest of the server classes use HTTP/1.1, the AuthTrans directive is:
AuthTrans fn="set-variable" keep-alive="disabled" http-downgrade="true"
To insert an HTTP header into each response, add a NameTrans directive to obj.conf using the insert-pblock command and specify srvhdrs as your Session or Request parameter block.
For example, to insert the HTTP header P3P, add the following line to each request:
NameTrans fn="set-variable" insert-srvhdrs="P3P"
To terminate processing a request based on certain URIs, use a Client tag to specify the URIs and an AuthTrans directive that sets the variable abort to true when there is a match. Your Client tag would be as follows:
<Client uri="*(system32|root.exe)*"> AuthTrans fn="set-variable" abort="true" </Client>
To use predefined variables so that the server rewrites redirects to host badname as redirects to host goodname:
<If $srvhdrs{'location'} =~ "^(http|https)://badname/(.*)$" Output fn="set-variable" $srvhdrs{'location'}="$1://goodname/$2" </If>
To set a $variable value at request time:
<If "$time_hour:$time_min" < "8:30" || "$time_hour:$time_min" > "17:00"> AuthTrans fn="set-variable" $docroot="/var/www/docs/closed" </If> ... NameTrans fn="document-root" root="$docroot"
Regardless of whether the $docroot variable has been defined in server.xml, its value is set to /var/www/docs/closed when the server is accessed after 5:00 p.m. and before 8:00 a.m. local time.