Server Side Includes
(SSI)
Echo Environment Variables
A number of environment variables can be used in #if and #echo
statements, such as
<!--#echo var="HTTP_USER_AGENT" -->
which yields the browser you are using:
CCBot/1.0 (+http://www.commoncrawl.org/bot.html)
These variables can be used in if/elif/else/endif statements, which allow you to construct conditional displays of information. The basic test is the comparison of two strings or a string and a unix egrep regular expression, the tests can be combined using the usual logical operations. See http://www.apache.org/docs/mod/mod_include.html#flowctrl for details.
Environment Variables displayed through echo:
DATE_GMT: Friday, 10-Jul-2009 06:36:05 GMT
DATE_LOCAL: Friday, 10-Jul-2009 02:36:05 EDT
DOCUMENT_NAME: ssi-echo.shtml
DOCUMENT_URI: /cwis/web/ssi-echo.shtml
LAST_MODIFIED: Wednesday, 14-Nov-2001 16:51:12 EST
DOCUMENT_ROOT: /afs/net.mit.edu/admin/www/root
DOCUMENT_PATH_INFO: (none)
DOCUMENT_URI: /cwis/web/ssi-echo.shtml
GATEWAY_INTERFACE: CGI/1.1
HTTP_REFERER: (none)
HTTPS: (none)
HTTPS_CIPHER: (none)
HTTPS_KEYSIZE: (none)
HTTPS_SECRETKEYSIZE: (none)
HTTP_ACCEPT: Accept: text/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
HTTP_ACCEPT_CHARSET: ISO-8859-1,utf-8;q=0.7,*;q=0.7
HTTP_ACCEPT_ENCODING: gzip
HTTP_ACCEPT_LANGUAGE: en-us,en;q=0.5
HTTP_CONNECTION: close
HTTP_HOST: web.mit.edu
HTTP_PRAGMA: no-cache
HTTP_USER_AGENT: CCBot/1.0 (+http://www.commoncrawl.org/bot.html)
PATH: /usr/local/perl5/bin:/usr/local/sendmail/bin:/usr/local/mimedefang/bin:/usr/local/bind/bin:/usr/local/dcc/bin:/usr/local/uvscan:/usr/local/spamscreen/bin:/usr/athena/bin:/usr/athena/etc:/etc/athena:/usr/kerberos/bin:/usr/kerberos/sbin:/usr/sbin:/sbin:/bin/athena:/bin:/usr/bin:/etc:/usr/X11R6/bin
QUERY_STRING:
QUERY_STRING_UNESCAPED: (none)
REMOTE_ADDR: 38.103.63.61
REMOTE_PORT: 55542
REQUEST_METHOD: GET
REQUEST_URI: /cwis/web/ssi-echo.shtml
SCRIPT_FILENAME: /afs/net.mit.edu/admin/www/root/afs/athena.mit.edu/org/c/cwis/web/ssi-echo.shtml
SCRIPT_NAME: /cwis/web/ssi-echo.shtml
SERVER_ADMIN: network@mit.edu
SERVER_NAME: web.mit.edu
SERVER_PORT: 80
SERVER_PROTOCOL: HTTP/1.1
SERVER_SOFTWARE: Apache/1.3.41 (Unix) mod_ssl/2.8.31 OpenSSL/0.9.8j
SERVER_SIGNATURE: <ADDRESS>Apache/1.3.41 Server at web.mit.edu Port 80</ADDRESS>
SSL_CIPHER: (none)
SSL_CLIENT_C: (none)
SSL_CLIENT_CN: (none)
SSL_CLIENT_DN: (none)
SSL_CLIENT_EMAIL: (none)
SSL_CLIENT_I_C: (none)
SSL_CLIENT_I_DN: (none)
SSL_CLIENT_I_O: (none)
SSL_CLIENT_I_OU: (none)
SSL_CLIENT_I_ST: (none)
SSL_CLIENT_O: (none)
SSL_CLIENT_OU: (none)
SSL_CLIENT_ST: (none)
SSL_PROTOCOL_VERSION: (none)
SSL_SERVER_C: (none)
SSL_SERVER_CN: (none)
SSL_SERVER_DN: (none)
SSL_SERVER_I_C: (none)
SSL_SERVER_I_CN: (none)
SSL_SERVER_I_DN: (none)
SSL_SERVER_I_O: (none)
SSL_SERVER_I_OU: (none)
SSL_SERVER_I_ST: (none)
SSL_SERVER_O: (none)
SSL_SERVER_OU: (none)
SSL_SERVER_ST: (none)
SSL_SSLEAY_VERSION: (none)
USER_NAME: user#31767
For more information, see http://www.apache.org/docs/mod/mod_include.html
Features provided by web.mit.edu
Comments to
web-request@mit.edu