: Web

Variables available for use in Server Side Includes

  • SERVER_SOFTWARE

    The name and version of the information server software answering the request (and running the gateway). Format: name/version

  • SERVER_NAME

    The server's hostname, DNS alias, or IP address as it would appear in self-referencing URLs.

  • REMOTE_HOST

    The hostname making the request. If the server does not have this information, it should set REMOTE_ADDR and leave this unset.

  • REMOTE_ADDR

    The IP address of the remote host making the request.

  • AUTH_TYPE

    If the server supports user authentication, and the script is protects, this is the protocol-specific authentication method used to validate the user.

  • REMOTE_USER

    If the server supports user authentication, and the script is protected, this is the username they have authenticated as.

  • CONTENT_TYPE

    For queries which have attached information, such as HTTP POST and PUT, this is the content type of the data.

  • CONTENT_LENGTH

    The length of the said content as given by the client.

  • HTTP_ACCEPT

    The MIME types which the client will accept, as given by HTTP headers. Other protocols may need to get this information from elsewhere. Each item in this list should be separated by commas as per the HTTP spec.

    Format: type/subtype, type/subtype

  • HTTP_USER_AGENT

    The browser the client is using to send the request. General format: software/version library/version.

  • DOCUMENT_NAME: The current filename.

  • DOCUMENT_URI: The virtual path to this document (such as /~robm/foo.shtml).

  • QUERY_STRING_UNESCAPED: The unescaped version of any search query the client sent, with all shell-special characters escaped with \.

  • DATE_LOCAL: The current date, local time zone. Subject to the timefmt parameter to the config command.

  • DATE_GMT: Same as DATE_LOCAL but in Greenwich mean time.

  • LAST_MODIFIED: The last modification date of the current document. Subject to timefmt like the others.