Share via


Standard Common Gateway Interface Variables Available

Note

Indexing Service is no longer supported as of Windows XP and is unavailable for use as of Windows 8. Instead, use Windows Search for client side search and Microsoft Search Server Express for server side search.

 

The variables below are normally set by Common Gateway Interface (CGI) program execution and can be referred to in the .idq or .htx files.

HTTP Variable Meaning
ALL_HTTP All HTTP headers that were not already parsed into one of the listed variables. These variables are of the form HTTP_header field name with each variable separated by \r\n; for example: HTTP_ACCEPT: */*, q=0.300, audio/x-aiff, audio/basic, image/jpeg, image/gif, text/plain, text/html HTTP_USER_AGENT: Microsoft Internet Explorer/0.1 (Win32) HTTP_REFERER: http://webserver/samples/dbsamp/dbsamp3.htm HTTP_CONTENT_TYPE: application/x-www-form-urlenPRE: 10 HTTP_EXTENSION: Security/Digest
AUTH_TYPE The type of authorization in use. If the user name has been authenticated by the server, this will contain Basic. Otherwise, it will not be present.
CONTENT_LENGTH The number of bytes that the script can expect to receive from the client.
CONTENT_TYPE The content type of the information supplied in the body of a POST request.
GATEWAY_INTERFACE The revision of the Common Gateway Interface (CGI) specification with which this server complies. The current version is 1.1.
HTTP_ACCEPT Special-case HTTP header. Values of the Accept: fields are concatenated, separated by “,”; for example, if the following lines are part of the HTTP header: accept: */*; q=0.1 accept: text/html accept: image/jpeg then the HTTP_ACCEPT variable will have a value of: */*; q=0.1, text/html, image/jpeg.
PATH_INFO Additional path information, as given by the client. This comprises the trailing part of the URL after the script name but before the query string (if any).
PATH_TRANSLATED This is the value of PATH_INFO, but with any virtual path name expanded into a directory specification.
QUERY_STRING The information which follows the question mark (?) in the URL that referenced this script.
REMOTE_ADDR The IP address of the client.
REMOTE_HOST The host name of the client.
REMOTE_USER This contains the user name supplied by the client and authenticated by the server.
REQUEST_METHOD The HTTP request method.
SCRIPT_NAME The name of the script program that is being run.
SERVER_NAME The server’s host name (or IP address) as it should appear in self-referencing URLs.
SERVER_PORT The TCP/IP port on which the request was received.
SERVER_PROTOCOL The name and version of the information-retrieval protocol relating to this request, usually HTTP 1.0.
SERVER_SOFTWARE The name and version of the web server under which the Internet Server Extension is running.