CINXE.COM

Tech Stuff - Apache Server Side Includes (SSI and XSSI)

<!DOCTYPE html> <html lang="en-us"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link rel="icon" href="http://www.zytrax.com/favicon.ico"> <title>Tech Stuff - Apache Server Side Includes (SSI and XSSI)</title> <!-- this page originated from http://www.zytrax.com/tech/web/ssi.htm --> <!-- HTTP_USER_AGENT=Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506; .NET CLR 3.5.21022; .NET CLR 1.0.3705; .NET CLR 1.1.4322) --> <style type="text/css"> <!-- /* ZYTRAX STYLE SHEET */ /* google maps */ /* v\:* {behavior:url(#default#VML);} */ /* tag modifiers */ a {text-decoration:none;color:gray;} a:hover {text-decoration:underline;} a:hover.p-f-s {color:black} a:hover.a-n {text-decoration:none;} body {background-color:white;color:black;margin:0px;padding:0px;font:normal 1.0em Verdana,Arial, Helvetica, sans-serif;} code {border:1px solid lightgray;background:mintcream;color:black;font-family:"Courier New", monospace;padding:0 2px} div.l-f table{width:100%;padding:4px;} h1 {font-size:1.5em;;border-width:0 0 5px 0;border-style:solid;border-color:LightGray;padding:4px;color:black} h2 {border-width:0 0 5px 0;border-color:LightGray;border-style:solid;font-size:1.3em;font-weight:bold;padding:4px;color:black} h3 {border-width:0 0 3px 0;border-color:LightGray;border-style:solid;font-size:1.1em;padding:4px;color:black;} h4 {border-width:0 0 2px 0;border-color:LightGray;border-style:solid;font-size:1.0em;padding:2px;color:black;} h5 {border-width:0 0 2px 0;border-color:LightGray;border-style:solid;font-size:1.0em;font-weight:bold;color:black;padding:4px;} h6 {border-width:0 0 1px 0;border-color:LightGray;border-style:solid; font-size:80%;color:black;padding:4px;} pre {white-space:pre-wrap;} img {border:0;} img.center {display:block;margin-left:auto;margin-right:auto;} img.right {display:block;float:right;} img.left {display:block;float:left;} form {border:1px solid #ccc;} input {border:1px solid #999;background:#9bf;} textarea {border:1px solid #999;background:#9bf;} table {margin: 0 auto;} table.t-m-n > tbody > tr > td {border:1px solid #ccc;padding:4px;} table.t-m-s > tbody > tr > td {border:1px solid #ccc;padding:4px;} table.p-m-n > tbody > tr > td {padding:4px;border-collapse:collapse;} table.p-m-s > tbody > tr > td {padding:4px;border-collapse:collapse;} tr {vertical-align:top;} /* end tag modifiers - Printer friendly */ .adv {margin-right:auto;margin-left:auto;width:728px;} .l-b {position:absolute;top:0px;left:0px;font-size:80%;border:0;background:white;color:gray;height:100px;z-index:9;width:100%;} div.l-r #layout {visibility:visible;} div.l-l-fp #layout {visibility:visible;} .l-l {position:absolute;top:100px;left:6px;width:110px;font:10pt Verdana,Helvetica, Arial, sans-serif;z-index:1;} .l-c {margin:105px 170px 0px 125px;padding:4px 20px;border-width:0 1px; border-style:solid; border-color:LightGray; z-index:5; line-height:1.3em;} .l-r {position:absolute;top:100px;right:0;width:160px;background:white;z-index:2;font-size:80%;} /* end printer friendly - begin divs generic (cross browser) */ .i-2 {background: url(../../images/info.gif) no-repeat top left;border-width: 3px 0 3px 0; border-style:solid;border-color:#bbb;font-size:10pt;padding:10px 10px 10px 60px;margin:10px;} .i-3 {background: url(../../../images/info.gif) no-repeat top left;border-width: 3px 0 3px 0; border-style:solid;border-color:#bbb;font-size:10pt;padding:10px 10px 10px 60px;margin:10px;} .l-c-i {padding:10px;} .l-l-fp {position:absolute;top:95px;left:6px;width:120px;z-index:10;text-align:right;font-size:80%;} .l-r-fp {position:absolute;top:95px;right:6px;width:150px;z-index:2;font-size:80%;} .l-f-m {} .l-f {margin:0 200px 0 125px;} .l-p {margin:10px;padding:4px;font:10pt Verdana,Helvetica, Arial, sans-serif;} .l-100 {width:100%;margin:0;} .w-2 {background: url(../../images/warning.gif) no-repeat top left;border-width: 3px 0 3px 0; border-style:solid;border-color:#bbb;font-size:10pt;padding:10px 10px 10px 60px;margin:10px;} .w-3 {background: url(../../../images/warning.gif) no-repeat top left;border-width: 3px 0 3px 0; border-style:solid;border-color:#bbb;font-size:10pt;padding:10px 10px 10px 60px;margin:10px;} /* end divs - begin nav pop-outs */ .n-l-c {color:black;} .n-l1 {padding:0;margin:0;list-style:none;width:100px;} .n-l1p {padding:0;margin:0;list-style:none;text-align:right;color:#339;} .n-l1p-e {font-size:9pt;margin:0;text-align:right;line-height:1.2em;position:relative;color:#339;} .n-l1-e {text-align:right;margin:0;padding:2px;position:relative;} .n-t1-e,.n-t2-e,.n-t3-e,.n-m-l1 {text-align:left;margin:0;padding:2px 5px;border:1px solid black;border-width:1px 1px 0 1px;position:relative;} .n-t1-es,.n-t2-es,.n-t3-es {text-align:left;margin:0;padding:2px 5px;border:1px solid black;border-width:1px 1px 0 1px;position:relative;background:#eee;} .n-t1-v {position:absolute;display:none;padding:0;margin:0;list-style:none;top:100%;right:0;width:100px; border-bottom:1px solid black;background:white;} .n-t1-vr,.n-m-u1 {position:absolute;display:none;padding:0;margin:0;list-style:none; top:100%;right:0;width:100px;border-bottom:1px solid black;background:white;} .n-t2,.n-t3 {position:absolute;display:none;padding:0;margin:0;list-style:none;top:0;right:100%;width:120px;border-bottom:1px solid black;background:white;} /* end pop-up styles - begin nav effects */ .g-c-n:hover {background:#eee;} .g-c-s:hover {background:#eee;} /* W3c pop-ups - selectors ignored by MSIE 6- */ div.n-m:hover > ul {display:block;} div.n-t0:hover > ul {display:block;} li.n-t1-e:hover > ul {display:block;} li.n-t1-es:hover > ul {display:block;} li.n-t1-e:hover, li.n-t1-es:hover,li.n-t2-e:hover,li.n-t2-es:hover,li.n-t3-e:hover,li.n-m-l1:hover {background:#ccc;} li.n-t2-e:hover > ul {display:block;} li.n-t2-es:hover > ul {display:block;} .n-l1-e:hover > ul {display:block;} .n-l1p-e:hover > ul {display:block;} .n-l1-es:hover > ul {display:block;} .n-l2-e:hover > ul {display:block;} .n-l2-es:hover > ul {display:block;} .n-l3-e:hover > ul {display:block;} .n-l3-es:hover > ul {display:block;} li.n-l1-e:hover,li.n-l1p-e:hover,li.n-l2-e:hover,li.n-l2-es:hover, li.n-l3-e:hover, li.n-l3-es:hover,li.n-l4-e:hover {background:#ccc;} /* end pop-up effects - begin generic (cross browser) alpha */ .arrows {font-size:250%;} .a-n {text-decoration:none;} .at {font-family:Verdana,sans-serif;font-size:9pt;margin:0px;text-indent:8px;} .b-1 {font-family:Verdana, sans-serif;} .button {background:#ddd;border:3px outset black;} .b-lg {background-color:#eee;} .b-r {border-width:0 0 0 1px;border-color:#336;border-style:solid;width:150px;} .b-l {border-width:0 1px 0 0;border-color:#336;border-style:solid;width:110px;} .b-b-s {border:1px solid black;} /* color styles */ .c-r, .red {color:red;} .c-b, .blue {color:blue;} .c-lg {color:LightGray;} .c-g {color:gray;} /* end color styles */ .d {font-family:Verdana,sans-serif;font-size:9pt;margin:0px;} .dd {position:absolute;left:0;top:0; font-family:Tahoma,sans-serif;font-size:9pt; visibility:hidden;background:lime;color:black;margin:0px;border:black solid 1px;padding:2px;} .f-d {font-weight:bold;} .f-b-n {border:0;} /* most browsers use an unacceptably small monospace default font */ .g-c-n,.g-b-n {font:110% "Courier New",monospace;border-style:solid;border-color:#ccc;border-width: 1px 1px 1px 5px;background-color:#9bf;padding:5px; color:black;} .g-c-s,.g-b-s,.codegray {font: 80% "Courier New",monospace;border-style:solid;border-color:#ccc;border-width: 1px 1px 1px 5px; background-color:#9bf;padding:5px; color:black;width:inherit;} .g-h-n, .g-s-b {background:#9bf;color:#339;padding:4px;font-size:100%;font-weight:normal;border:1px solid #ccc;} .g-h-nn {background:#9bf;color:#339;padding:4px; font-size:100%;font-weight:normal;} .g-h-ng,.section {background:#339;color:white;font:bold Verdana,sans-serif;padding:4px; text-decoration:none;} .g-h-s {background:#9bf;color:#339;padding:4px; font-size:80%;font-weight:normal;border:1px solid #ccc;} .g-h-ss {background:#9bf;color:#339;padding:4px; font-size:80%;font-weight:normal;} .g-n {text-decoration:none;color:white;} .g-i1-n {margin:5px 5px 5px 20px;} .g-i2-n {margin:5px 5px 5px 30px;} .g-i3-n {margin:5px 5px 5px 40px;} .g-l-n {list-style:none;} .g-sb-n {color:blue;font-size:8pt;line-height:150%;margin:2px;} .g-s-n {background-color:#eee;color:black;font-size:10pt; text-decoration:none;} .h-b {background:#ddd;color:black;font-weight:bold;} .h-150 {line-height:1.5em;} .i-h {margin:5px 5px 10px 60px;padding:5px;} .i-n {border-width: 3px 0 3px 0; border-style:solid;border-color:#bbb;font-size:10pt;padding:10px 10px 10px 60px;margin:10px;} .i-s {border-width: 3px 0 3px 0; border-style:solid;border-color:#bbb;font-size:8pt;margin:10px 10px 10px 60px;padding:10px;} .i-u {width:27px;} .n-l {position:fixed;left:6px;width:110px;} .n-l-fp {left:6px;width:110px;} .n-l-f {font-size:1.0em;margin:2px;text-align:right;line-height:1.2em;color:black;} .n-l-f a {color:black;} .m-h5 {margin:0.5em 0;} .m-h20 {margin:2.0em 0;} .n-b-l {font:1pt Verdana, Arial, Helvetica, sans-serif;border-width:0 0 1px 0;border-style:solid;border-color:#CCF;margin:0px;padding:0px;} .n-l-s {font-size:80%;visibility:hidden;} .n-m {font-size:130%;margin:0;padding:0;float:right;position:relative;} .n-t0 {float:right;position:relative;} .n-t-t {text-align:right;padding:1px 1px 8px 1px;margin:0;} .o-n {list-style:none;} .p-b {background:#eee;text-indent:3em;} .p-m-n,.norm {font-size: 100%;border-spacing:0;border-collapse:collapse;} .p-m-s { font-size:80%;border:0;border-spacing:0;border-collapse:collapse;} .q-i-2 {background: url(../../images/quotes-open.gif) no-repeat top left;} .q-s {border-width: 0 0 0 6px;border-style:solid;border-color:#acf;font-size:8pt;margin:10px 10px 10px 60px;padding:10px;} .t-b-s {font:8pt "Courier New",monospace;border-style:solid;border-color:#ccc;border-width: 1px;background-color:#acf;padding:5px; color:black;} .t-b-n {font:10pt "Courier New",monospace;border-style:solid;border-color:black;border-width: 1px;background-color:#acf;padding:5px; color:black;} /* link/href styles */ .t-dd:hover {background:#ddd;} .w-db:hover {background:#ddd;} .t-ba {color:#aaa;font-weight:bold;} .t-gb {color:blue;background:#eee;} .t-dr {color:red;text-decoration:none;} .t-dw {color:#666;text-decoration:none;} .t-db,.t-dd {color:blue;text-decoration:none;} .t-da {color:black;} .w-db,.t-dn {text-decoration:none;} /* begin text styles */ .t-b {font-size:120%;} .t-b200 {font-size:200%;} .t-c, .center {text-align:center;} .t-g {background:#eee;} .t-h {} div.t-h:hover > div {display:block;} .t-h-1 {display:none;background:#eee;padding:5px;} .t-i {font-style:italic;} .t-l {text-align:left;} .t-n, .g-e-t, .g-e-d {font-size:100%;font-weight:normal;} .t-o {font-weight:bold;} .t-r {text-align:right;} .t-s {font-size:80%;} .t-ss {font-size:60%;} /* table styles */ .t-t-l {margin:0;} .t-td1-l,.t-td1 {border-style:solid;border-width:5px 0 0 0;border-color:#ddd;padding:3px 3px 8px 5px;} .t-td2-l,.t-td2 {border-style:solid;border-width:5px 0 0 0;border-color:#acf;padding:3px 3px 8px 5px;} .t-m {background:#ccc;color:blue;text-decoration:none;} .t-m-n {font-size: 100%;border: 2px solid #ccc;border-spacing:0;border-collapse:collapse;} .t-m-s {font-size:80%;border: 2px solid #ccc;border-spacing:0;border-collapse:collapse;} .vital {font-family:Tahoma,Arial, sans-serif;font-size:12pt;background-color:#ddd; color:black;border-color:red;} /* visibility */ .v-h {visibility:hidden;} /* width styles */ .w-450 {width:450px;} .w-350 {width:350px;} .w-300 {width:300px;} .w-250 {width:250px;} .w-200 {width:200px;} .w-180 {width:180px;} .w-150 {width:150px;} .w-120 {width:120px;} .w-100 {width:100px;} .w-80 {width:80px;} .w-88 {width:88px;} .w-50 {width:50px;} .w-32 {width:32px;} .w-27 {width:27px;} .w-20 {width:20px;} .w-10 {width:10px;} .w-11pc {width:11%;} .w-6pc {width:6%;} /* Gecko/W3C specific */ abbr[title]:after {content:"";} abbr[title]:hover:after {content:" (" attr(title)")";} /* W3C pop-ups */ .n-l2,.n-l3,.n-l4 {position:absolute;display:none;padding:0;margin:0;list-style:none;top:0;left:100%;width:120px;border-bottom:1px solid black;background:#EEE;font:8pt Verdana,Helvetica, Arial, sans-serif} .n-l2-e,.n-l3-e,.n-l4-e {text-align:left;margin:0;padding:2px 5px;border:1px solid black;border-width:1px 1px 0 1px;position:relative;} .n-l2-es,.n-l3-es,.n-l4-es {text-align:left;margin:0;padding:2px 5px;border:1px solid black;border-width:1px 1px 0 1px;position:relative;background:white;} /* end - start expand divs */ .v-f {display:none;} .v-o {display:block;} /* end expand divs */ #toplogo {float:left;vertical-align:bottom;} .g-ci-s {font:8pt "Courier New",monospace;border-style:solid;border-color:#ccc;border-width: 1px 1px 1px 5px; background-color:#acf;color:black;} .jp-h-n {position:absolute;left:50%;top:50%;text-indent:4px;font-family:Verdana,sans-serif;font-size:10pt; visibility:hidden;background:#EEEEEE;color:blue;text-decoration:none;} .n-l-u {font-family:Verdana,sans-serif;top:60px;left:6px;width:110px;background:white;} .n-l-l {font-size: 9pt;color:black;text-align:right;line-height:150%;} .n-p-f {color:#336;font:9pt/16pt Verdana,sans-serif;text-decoration:none;text-indent:6px;} .n-p-n {background:#EEE;color:#336;font:9pt Verdana,sans-serif;text-indent:6px;} .n-p-n a {text-indent:6px;display:block;} .n-p-o {font:10pt Verdana,sans-serif; background:#DDD;color:blue;text-decoration:none;height:16pt;} .n-t-n {color:#336;font:10pt Verdana,sans-serif;text-decoration:none;margin:0;padding:0;} .n-t-s {color:white;font: 8pt Verdana,sans-serif;text-decoration:none;padding:0 3px 0 0} .n-t-sr {color:#336;font: 8pt Verdana,sans-serif;text-decoration:none;padding:0 3px 0 0} .p-b-h {visibility:hidden;} .p-n-h {position:absolute;left:0;top:0;text-indent:4px;font-family:Verdana,sans-serif;font-size:small; visibility:hidden;background:#EEE;color:blue;text-decoration:none;border:1px blue solid;width:110px;} .p-f-s {font-family: Verdana, sans-serif; font-size:8pt; color:silver; background:white;text-decoration:none;} --> </style> <style type="text/css" media="print"> <!-- /* ZYTRAX STYLE SHEET PRINT TEMPLATE */ .l-l {display:none;} .l-r {display:none;} .l-c {width:600px;margin:0;padding:30px 10px 5px 10px; border-width:0;} .l-f {margin:5px;} .n-t-t {display:none;} .n-t0 {display:none;} .adv {display:none;} --> </style> <script type="text/javascript"> <!-- // copyright ZYTRAX, Inc. 1994 - 2014 // you may use this javascript code at your own risk. // we would like you to keep the copyright statement intact but don't insist on it. // If you make improvements mail us a copy or make it available on your own web site. // global variables var topall = new Array(2); var lownav = new Array(2); var lowpop = new Array(2); var rightnav = new Array(2); var rightpop = new Array(2); var x = 0; // global menu level var way = 'h'; var menu = null; var menus = null; var pop1 = new Array(2); var fs = 1.0; var days = new Array(7); var months = new Array(12); days = ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]; months = ["January","February","March","April","May","June","July","August","September","October","November","December"]; function showtime() { var thistime = ""; var nowtime ="" var nowam = "AM"; var now = new Date(); var nowhour = now.getHours(); if (nowhour > 12) { nowam = "PM"; nowhour = nowhour - 12; } else if (nowhour == 0){ nowhour = 12; } var nowminutes = now.getMinutes(); if (nowminutes < 10 ){ nowminutes = "0" + nowminutes; } nowtime = nowhour + ":" + nowminutes + " " + nowam; thistime = days[now.getDay()] + " " + now.getDate() + " " + months[now.getMonth()] + " " + now.getFullYear() + ", " + nowtime; return thistime; } // -- W3C DOM specific code - first choice always function lock(num){ // lock relies on a style which end with -l rollover = document.getElementById("l" + num); if(rollover){ cn = rollover.className if((pos = cn.lastIndexOf("-")) != -1){ bcn = cn.substring(0,pos + 1); scn = cn.substring(pos +1); if(scn == "f" || scn == "o"){ rollover.className = bcn + "l"; } } } } function fontchange(fix) { x = document.getElementsByTagName("div"); for(i = 0; i < x.length; i++) { if(x[i].className == "l-c"){ if(x[i].style.fontSize == ""){ fs = 1.0; x[i].style.fontSize = "1.0em"; } if(fix == "d"){ if(fs <= 0.8){ break; }else{ fs = parseFloat(fs - 0.1); x[i].style.fontSize = fs + "em"; } }else{ if(fs >= 1.5){ break; }else{ fs = parseFloat(fs + 0.1); x[i].style.fontSize = fs + "em"; } } break; } } } function toggle(tid){ var dis; var disa; if(document.getElementById){ dis = document.getElementById(tid); disa = document.getElementById(tid + 'a'); }else{ dis = document.all.tid; disa = document.all.tid + 'a'; } if(dis.style.display == 'block'){ dis.style.display = 'none'; disa.style.display = 'block'; }else{ dis.style.display = 'block'; disa.style.display = 'none'; } } function gotourl($url) { window.location = $url; } function mailus(mbox,stub,subject) { mail = "mailto:"+mbox+"@"+stub; if(subject != ""){ mail = mail+"?SUBJECT="+"A-Z: "+subject; } window.location = mail; return; } // W3C compliant uses CSS popups not JS //--> </script> </head> <body> <!-- Page Header plus top nav bar --> <div class="l-b"> <!--if expr="!${isMob}" --> <a href="http://www.zytrax.com"><img id="toplogo" src="http://www.zytrax.com/images/zytrax-logo-info.png" alt="ZYTRAX Info Logo"></a> <!-- desktop browsers --> <p class="n-t-t"><a href="http://www.zytrax.com/feedback.htm" class="n-t-sr">mail us</a> &nbsp;&#124;&nbsp; <a href="http://www.zytrax.com/run/mailpage.php" class="n-t-sr">mail this page</a></p> <div class="n-t0"> <a href="http://www.zytrax.com/Company/contacts.html" class="n-t-sr">contact us</a> </div> <div class="n-t0"> <a href="http://www.zytrax.com/training/" class="n-t-sr">training</a> &nbsp;&#124;&nbsp; </div> <div class="n-t0"> <a href="http://www.zytrax.com/tech/" class="n-t-sr">tech stuff</a> &nbsp;&#124;&nbsp; <ul class="n-t1-v"> <li class="n-t1-es"><a href="http://www.zytrax.com/tech/" class="t-da">tech stuff</a> <!-- tertiary pop-outs --> <ul class="n-t2"> <li class="n-t2-e"><a title="collection of technology stuff" href="http://www.zytrax.com/tech/" class="t-da">tech stuff</a></li> <li class="n-t2-es t-da">web stuff <ul class="n-t3"> <li class="n-t3-e"><a title="collection of web based technology stuff" href="http://www.zytrax.com/tech/web/" class="t-da">web stuff</a></li> <li class="n-t3-e"><a title="collection of UA strings for most browsers" href="http://www.zytrax.com/tech/web/browser_ids.htm" class="t-da">browser ids</a></li> <li class="n-t3-e"><a title="collection of mobile UA strings" href="http://www.zytrax.com/tech/web/mobile_ids.html" class="t-da">mobile ids</a></li> <li class="n-t3-e"><a title="our HTML5 page conversion process and thoughts" href="http://www.zytrax.com/tech/css/html5.html" class="t-da">HTML5 Convert</a></li> <li class="n-t3-e"><a title="how we do server-side browser sniffing with apache" href="http://www.zytrax.com/tech/web/browser_sniffing.html" class="t-da">browser sniffing</a></li> <li class="n-t3-e"><a title="apache environmental variables" href="http://www.zytrax.com/tech/web/env_var.htm" class="t-da">apache env's</a></li> <li class="n-t3-e"><a title="apache server side includes - extensive notes and examples" href="http://www.zytrax.com/tech/web/ssi.htm" class="t-da">apache ssi</a></li> <li class="n-t3-e"><a title="our css pop-up/pop-down/flyout menus for Gecko/Opera/MSIE" href="http://www.zytrax.com/tech/css/workarounds.html#popout" class="t-da">pop-outs (css)</a></li> <li class="n-t3-e"><a title="most of those annoying HTML entity codes that we forget all the time" href="http://www.zytrax.com/tech/web/entities.html" class="t-da">html entities</a></li> </ul> </li> <li class="n-t2-es t-da">open guides <ul class="n-t3"> <li class="n-t3-e"><a href="http://www.zytrax.com/books/" class="t-da">open guides</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/books/dns" class="t-da">dns guide</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/books/ldap" class="t-da">ldap guide</a></li> </ul> </li> <li class="n-t2-e"><a title="Decimal to Hexidecimal to Binary conversion - even Octal!" href="http://www.zytrax.com/tech/protocols/hex.html" class="t-da">Dec>Hex>Bin</a></li> <li class="n-t2-es t-da">survival stuff <ul class="n-t3"> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/survival/" title="a series of survival guides for some popular open source software" class="t-da">survival stuff</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/survival/ssl.html" class="t-da">ssl/tls &amp; x.509</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/survival/asn1.html" class="t-da">ASN.1</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/survival/kerberos.html" class="t-da">kerberos</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/survival/postfix.html" class="t-da">postfix</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/survival/cron.html" class="t-da">cron</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/survival/encryption.html" class="t-da">cryptography</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/survival/wxwidgets.html" class="t-da">wxWidgets</a></li> </ul> </li> <li class="n-t2-es t-da">audio stuff <ul class="n-t3"> <li class="n-t3-e"><a title="Pages about Digital Audio, Primers, Calculator, Equalization, FFT" href="http://www.zytrax.com/tech/audio/" class="t-da">audio stuff</a></li> <li class="n-t3-e"><a title="Fundamentals, harmonics, overtone, partials, loudness, ADSR envelopes" href="http://www.zytrax.com/tech/audio/sound.html" class="t-da">sound primer</a></li> <li class="n-t3-e"><a title="Sound digitization, time domain, frequency domain" href="http://www.zytrax.com/tech/audio/digital-sound.html" class="t-da">digital sound</a></li> <li class="n-t3-e"><a title="common frequencies of instruments and in life" href="http://www.zytrax.com/tech/audio/audio.html" class="t-da">frequencies</a></li> <li class="n-t3-e"><a title="equalization principles, octaves, sound metering and FFT" href="http://www.zytrax.com/tech/audio/equalization.html" class="t-da">equalization</a></li> <li class="n-t3-e"><a title="Acoustic caculators for musical notes and FFT bin frequencies" href="http://www.zytrax.com/tech/audio/calculator.html" class="t-da">calculators</a></li> <li class="n-t3-e"><a title="Yet another audio glossary" href="http://www.zytrax.com/tech/audio/glossary.html" class="t-da">glossary</a></li> </ul> <li class="n-t2-e"><a href="http://www.zytrax.com/tech/web/regex.htm" class="t-da">regex stuff</a></li> <li class="n-t2-es t-da">cable stuff <ul class="n-t3"> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/layer_1/" class="t-da">cable stuff</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/layer_1/cables/tech_lan.htm" class="t-da">lan wiring</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/layer_1/cables/mixed.html" class="t-da">lan &amp; telephone</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/layer_1/cables/tech_rs232.htm" class="t-da">rs232 stuff</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/layer_1/cables/heavy.htm" class="t-da">serial primer</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/pc/serial.html" class="t-da">usb 3.2 &amp; firewire</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/pc/monitors.htm" class="t-da">displays</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/layer_1/cables/cables_jacks.htm" class="t-da">modular jacks</a></li> </ul> </li> <li class="n-t2-es t-da">protocol stuff <ul class="n-t3"> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/protocols/" class="t-da">protocol stuff</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/protocols/tcp.html" class="t-da">tcp-udp-icmp</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/protocols/ip-classes.html" class="t-da">ipv4</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/protocols/ip-classes.html#calculator" class="t-da">ipv4 Calculator</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/protocols/ipv6.html" class="t-da">ipv6</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/protocols/ipv6.html#calculator" class="t-da">ipv6 Calculator</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/protocols/isdn" class="t-da">isdn-bri</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/protocols/lan" class="t-da">802 lan</a></li> <li class="n-t3-e"><a href="http://www.zytrax.com/tech/ss7" class="t-da">ss7 &amp; sigtran</a></li> </ul> </li> <li class="n-t2-e"><a href="http://www.zytrax.com/tech/pc/" class="t-da">pc stuff</a></li> <li class="n-t2-e"><a href="http://www.zytrax.com/tech/wireless/" class="t-da">wireless stuff</a></li> <li class="n-t2-es t-da">css stuff <ul class="n-t3"> <li class="n-t3-e"><a title="collection of css notes and experiences including css menus and css liquid layout" href="http://www.zytrax.com/tech/css/" class="t-da">css stuff</a></li> <li class="n-t3-e"><a title="Notes on our experience with converting to css based liquid layouts - including blow by blow css" href="http://www.zytrax.com/tech/css/layoutnotes.html" class="t-da">css liquid design</a></li> <li class="n-t3-e"><a title="we have used css menus since mid-2003 - blow-by-blow implementation notes" href="http://www.zytrax.com/tech/css/workarounds.html#popout" class="t-da">css menus</a></li> <li class="n-t3-e"><a title="some practical solutions on using css" href="http://www.zytrax.com/tech/css/workarounds.html" class="t-da">css notes</a></li> <li class="n-t3-e"><a title="css shortforms at a glance" href="http://www.zytrax.com/tech/css/shortcut.html" class="t-da">css short-forms</a></li> <li class="n-t3-e"><a title="css selectors and quick overview with links to the W3C specs" href="http://www.zytrax.com/tech/css/syntax.html" class="t-da">css overview</a></li> </ul> </li> <li class="n-t2-e"><a href="http://www.zytrax.com/tech/codes.htm" class="t-da">ascii codes</a></li> <li class="n-t2-e"><a href="http://www.zytrax.com/tech/data_rates.htm" class="t-da">data rate stuff</a></li> <li class="n-t2-e"><a href="http://www.zytrax.com/tech/telephony/" class="t-da">telephony stuff</a></li> <li class="n-t2-e"><a href="http://www.zytrax.com/tech/mech/" class="t-da">mech. stuff</a></li> <li class="n-t2-e"><a href="http://www.zytrax.com/tech/protocols/hex.html" class="t-da">Dec>Hex>Bin</a></li> <li class="n-t2-e"><a href="http://www.zytrax.com/tech/lang/" class="t-da">language stuff</a></li> <li class="n-t2-e"><a href="http://www.zytrax.com/tech/electronics/" class="t-da">electronic stuff</a></li> <li class="n-t2-e"><a href="http://www.zytrax.com/tech/rfcs/" class="t-da">rfc stuff</a></li> </ul> </li> <li class="n-t1-e"><a href="http://www.zytrax.com/security/" class="t-da">Security</a></li> </ul> </div> <!-- close div l-b --> </div> <!-- begin body table --> <div class="l-c"> <!-- generic tech ads --> <p class="adv"> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- Browser Leaderboard --> <ins class="adsbygoogle" style="display:inline-block;width:728px;height:90px" data-ad-client="ca-pub-9419480011552853" data-ad-slot="9281933980"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </p> <h1 id="contents">Apache - Server Side Includes</h1> <p>This page describes the functionality offered by, and the use of, Apache Server Side Includes (SSI and XSSI) (<a href="popout_apache.htm" class="t-db">how to configure Apache to support SSI</a>).</p> <p><b>Note:</b> The original of this page was written many, many moons ago when the world was young. We had the unhappy task of re-visiting it recently because of an email question and have corrected a number of errors, ambiguities and explanations which were shaky at best. All the information relates to PHP5 and Apache 2.x (currently 2.4).</p> <p><b>Sad Note:</b> Apache 2.4 (actually 2.3.13+) has changed the syntax of conditional expressions. The old behavior can be restored using the <b>SSILegacyExprParser</b> directive. Why do they do this stuff? Apache 1.3 used to be like a rock for backward compatibility.</p> <p><b>Happier (Maybe) Note:</b> We recently decided to create an HTML Help Service for <a href="../../books/ldap/lv" class="t-db">LDAPviewer</a> a Java based open source application we are working on. The Help service would be viewable from the web and (if using JRE 1.8) using local files distributed with the application. We are addicted to the use of (X)SSI includes to keep HTML development to a minimum. The question was what to do about local files. The result was this very trivial and limited <a href="../lang/java/index.html#xssi" class="t-db">Java XSSI</a> tool, which will expand (X)SSI <a href="#include" class="t-db">include</a> directives in .html, .htm and .shtml files and copy referenced images to a images subdirectory in the output directory (fixing the &lt;img> src reference at the same time). We do all our HTML page development on the web version and simply run the files through this directory based tool to create pure HTML (HTML5 in our case) as output to be distributed with the application or for use with web servers which do not support (X)SSI.</p> <h3>Contents</h3> <ol class="o-n"> <li><a href="#overview" class="t-db">SSI Overview</a></li> <li><a href="#directives" class="t-db">SSI Directives</a></li> <li><a href="env_var.htm" class="t-db">Apache and SSI Environmental Variables</a></li> <li><a href="#time" class="t-db">Time and Date Formats</a></li> <li><a href="#variables" class="t-db">Example - Use of Apache Variables</a></li> <li><a href="#dates" class="t-db">Example - Page Changed and Copyright Date in Footer</a></li> <li><a href="#page" class="t-db">Example - Page Source Comment</a></li> <li><a href="#absolute" class="t-db">Example - Absolute Page References with SSI</a></li> <li><a href="env_var.htm#qs" class="t-db">Variable Handling from QUERY_STRING</a></li> </ol> <h2 id="overview">SSI Overview</h2> <p>Server Side Includes are an Apache feature implemented by <a href="http://httpd.apache.org/docs/mod/mod_include.html" class="t-db">mod_include</a> (<a href="http://httpd.apache.org/docs/howto/ssi.html" class="t-db">see also this useful Apache article</a>). Files which have the suffix .shtml (or whatever suffix name you use on the <b>AddHandler server-parsed</b> directive and its corresponding <b>AddType text/html</b> directive) are parsed by the server for SSI (or any file if the XBitHack directive is used). SSIs may be used for many purposes as may be seen from the descriptions and examples below. Our own use of SSIs may help illustrate their use:</p> <ul> <li>A single Page header file (including <a href="#page" class="t-db">a page source comment</a>) </li> <li>Conditional generation of CSS in-line data (depending on <a href="#variables" class="t-db">browser variables</a>)</li> <li>Conditional generation of in-line Javascript (depending on <a href="#variables" class="t-db">browser variables</a>)</li> <li>News sections on certain pages</li> <li>Left hand navigation on certain pages</li> <li>Right hand navigation on certain pages</li> <li>Standard footers on all pages (including <a href="#dates" class="t-db">copyright and page modified dates</a>)</li> <li><a href="../css/workarounds.html#friendly" class="t-db">Printer Friendly pages</a> using conditionally generated CSS</li> </ul> <p><b>NOTE:</b> You cannot include SSI in a file named with a .php suffix (or whatever you have set your AddType values to for PHP) irrespective of the setting of XBitHack, instead use this <a href="../php/php_ssi.htm" class="t-db">technique</a>.</p> <p>Our goal is that with either a few simple changes to the CSS styles page and or the format of SSI included files we can change, more or less, the overall look and feel of the site very rapidly. SSIs offer, as well as the <a href="env_var.htm" class="t-db">standard Apache environmental variables, additional SSI specific variables</a>. These variables may be displayed at run time using the <a href="#printenv" class="t-db">#printenv SSI element</a>. <a href="show_env.shtml" class="t-db">Display them for our server</a> using <b>#printenv</b> or <a href="../../run/ssi.php" class="t-db">the tidy PHP version</a>.</p> <p><b>Note:</b> You can avoid the need to use .shtml file suffixes by the use of the <a href="popout_apache.htm" class="t-db">XBitHack</a> Apache Directive.</p> <p><a href="#contents"><img class="i-u" src="../../../images/go_up.gif" alt="up icon"></a></p> <h2 id="directives">The SSI Elements</h2> <p>The generic format of an Apache SSI is:</p> <pre class="g-c-s"> &lt;!--#element attribute=value attribute=value ... --&gt; </pre> <p>There MUST NOT be a space between the '#element' and the second opening '-' and there MUST BE a space between the last character of the last 'attribute=value pair and the first closing '-'.</p> <p>The element types are:</p> <table class="t-m-s t-t-l"> <tr class="g-h-n"> <td>Directive</td> <td>Function</td> </tr> <tr> <td><a href="#config" class="t-db">config</a></td> <td>formatting control.</td> </tr> <tr> <td><a href="#include" class="t-db">include</a></td> <td>in-line inclusion of files including nested files.</td> </tr> <tr> <td><a href="#conditional" class="t-db">flow control</a></td> <td>IF, ELIF, ELSE, ENDIF constructs for conditional processing.</td> </tr> <tr> <td><a href="#set" class="t-db">set</a></td> <td>sets variables that may be used by CGI or SSI processing.</td> </tr> <tr> <td><a href="#printenv" class="t-db">printenv</a></td> <td>displays all current variables.</td> </tr> <tr> <td><a href="#echo" class="t-db">echo</a></td> <td>displays contents of a variable.</td> </tr> <tr> <td><a href="#exec" class="t-db">exec</a></td> <td>executes a shell or cgi script</td> </tr> <tr> <td><a href="#fsize" class="t-db">fsize</a></td> <td>provides the size of a file.</td> </tr> <tr> <td><a href="#flastmod" class="t-db">flastmod</a></td> <td>last modification date of a file.</td> </tr> <tr> <td><a href="#time" class="t-db">time &amp; date</a></td> <td>time and date formats.</td> </tr> </table> <h3 id="config">config element</h3> <table class="t-m-s"> <tr class="g-h-n"> <td class="w-80">Element</td> <td class="w-80">Attributes</td> <td>Meaning</td> </tr> <tr> <td>config</td> <td></td> <td>Controls many aspects of the parsing behaviour. More than one attribute may be defined in a single #config statement. Allows the following attributes:</td> </tr> <tr> <td></td> <td>ermsg</td> <td>An optional string that may be used to override the standard error message, for example, ermsg="** SSI Error**"</td> </tr> <tr> <td></td> <td>sizefmt</td> <td>Sets the format to be used for reporting size values (using the <a href="#fsize" class="t-db">'fsize'</a> element) and may take the value 'bytes' in which case the size is reported in bytes or 'abbrev' in which case the size will be reported in Kbytes or Mbytes as appropriate.</td> </tr> <tr> <td></td> <td>timefmt</td> <td>Determines the format for date/time strings and may take any of the values defined <a href="#time" class="t-db">here</a>. <b>Note:</b> If a special date format is required in any variable then this command must be issued <u>before</u> the variable is set.</td> </tr> </table> <p><b>Example</b></p> <pre class="g-c-s"> &lt;!--#config ermsg="gottcha" timefmt="%c" --> </pre> <p>Changes the standard error message and outputs all date/times in 'locale' format.</p> <h3 id="include">include Element</h3> <table class="t-m-s"> <tr class="g-h-n"> <td class="w-80">Element</td> <td class="w-80">Attributes</td> <td>Meaning</td> </tr> <tr> <td>include</td> <td></td> <td><p>This command inserts the text of the included file into the parsed file. SSI files may be nested, that is the included file may contain additional SSI statements (but in this case must have an .shtml suffix irrespective of the setting of XBitHack). The included file inherits all the access control properties of the parsed file including all execute checks.</p> <p>Files which generate dynamic content may be included by SSI e.g. PHP or other CGI files but the variable QUERY_STRING is reset to null but QUERY_STRING_UNESCAPED remains valid with an additional \ between parameters (it has been processed twice).</p> <p>Files are included 'as is' i.e. they do not require any HTML other than that required in the context of the full page being generated. The attributes define the included file and may take the following values:</p></td> </tr> <tr> <td></td> <td>file</td> <td>Defined as being relative to the current directory and below only. It does not allow '../' or an absolute path.</td> </tr> <tr> <td></td> <td>virtual</td> <td>Accepts any relative format, for instance, '../../' or '/absolute/path/and/file' but only on this server. </td> </tr> </table> <h4>Example</h4> <pre class="g-c-s"> &lt;!--#include virtual="../../styles.shtml" --> </pre> <p>Includes the file styles.shtml (which because it is named .shtml may contain additional SSI statements) in this parsed file.</p> <h3 id="conditional">Conditional Expresssions</h3> <p>SSI enables conditional processing using any of the environmental or user defined variables. SSI provides the following elements to support this feature:</p> <table class="t-m-s"> <tr> <td class="t-c w-100">#if</td> <td><p>expr="test_condition"</p> <p>The test_condition may take any of the forms defined <a href="#tests" class="t-db">here</a>.</p> <p>If the test_condition result is TRUE then the lines following this element are included in the output until either an <b>#elif</b> (if present), <b>#else</b> (if present) or <b>#endif</b> elements are reached.</p> <p><b>Note:</b> Since Apache 2.3.13 the <b>test_condition</b> syntax has changed - see notes under <a href="#tests" class="t-db">tests</a> below.</p> </td> </tr> <tr> <td class="t-c w-100">#elif</td> <td><p>expr="test_condition"</p> <p>The test_condition may take any of the forms defined <a href="#tests" class="t-db">here</a>.</p> <p>If the test_condition result is TRUE then the lines following this element are included in the output until either the <b>#else</b> (if present) or <b>#endif</b> elements are reached.</p> <p><b>Note:</b> Since Apache 2.3.13 the <b>test_condition</b> syntax has changed - see notes under <a href="#tests" class="t-db">tests</a> below.</p> </td> </tr> <tr> <td class="t-c">#else</td> <td><p>none</p> <p>If the #if or #elif test_condition result is FALSE the SSI will continue from this point unconditionally until #endif.</p></td> </tr> <tr> <td class="t-c">#endif</td> <td><p>none</p> <p>Terminates the #if condition and MUST be present otherwise the conditional expression is NOT executed and the SSI will appear in the resulting output rather than the expected results.</p></td> </tr> </table> <h3 id="tests">Test Conditions Allowed</h3> <p><b>Important Note:</b> The following syntax has been available since dinosaurs walked the earth - until Apache 2.3.13. From this release on it croaks and requires that you use this <a href="http://httpd.apache.org/docs/current/expr.html" class="t-db">spiffy new format</a>. However fear not, the <b>SSILegacyExprParser on</b> directive will restore the old processing syntax and mean that your decrepit old code (this includes us) will continue to work. The <b>SSILegacyExprParser</b> directive can be placed in either an .htaccess file or a <b>&lt;Directory></b> clause. So, for example, if you want to use the old conditional processing syntax across all webs (and what idiot is going to rewrite all their SSI just to move to a new version of apache) then you would typically place it in a <b>Directory</b> clause covering the root document (giving it the same scope as your Include parameter) as shown below:</p> <pre class="g-c-s"> DocumentRoot "/usr/local/www" &lt;Directory "/usr/local/www"> ... # Options Indexes IncludesNOEXEC FollowSymLinks # SSILegacyExprParser on ... &lt;/Directory> </pre> <h2>Legacy (pre Apache 2.3.13) SSI test conditions</h2> <table class="t-m-s"> <tr class="g-h-n"> <td class="w-150">test_condition</td> <td>Result</td> </tr> <tr> <td>string1</td> <td>TRUE if string NOT empty.</td> </tr> <tr> <td>string1=string2</td> <td>TRUE if string1 is equal to string2.</td> </tr> <tr> <td>string1!=string2</td> <td>TRUE if string1 is NOT equal to string2.</td> </tr> <tr> <td>string1&lt;string2</td> <td>TRUE if string1 is less than string2.</td> </tr> <tr> <td>string1>string2</td> <td>TRUE if string1 is greater than string2.</td> </tr> <tr> <td>string1>=string2</td> <td>TRUE if string1 greater than or equal to string2.</td> </tr> <tr> <td>(test_condition)</td> <td>TRUE if test_condition TRUE.</td> </tr> <tr> <td>!test_condition</td> <td>TRUE if test_condition FALSE.</td> </tr> <tr> <td>test_condition1 &amp;&amp; test_condition2</td> <td>TRUE if test_condition1 AND test_condition2 TRUE.</td> </tr> <tr> <td>test_condition1 || test_condition2</td> <td>TRUE if test_condition1 OR test_condition2 TRUE.</td> </tr> </table> <h4>Notes:</h4> <ol> <li><p>If string2 is written /string2/ it is interpreted as a regular expression (see <a href="regex.htm" class="t-db">here</a>), for example, /MSIE/ will find MSIE anywhere in string1.</p></li> <li><p>Strings are enclosed in quotes thus, expr="${QUERY_STRING} = 'a=b'". <b>Note:</b> The syntax change in 2.3.13+ changes this expression form to expr="%{QUERY_STRING} = 'a=b'".</p></li> <li><p>If either string1 or string2 is a variable then the following syntax must be used ${var_name} - using curly brackets or braces. <b>Note:</b> The syntax change in 2.3.13+ changes this expression form to %{var_name}.</p></li> <li><p>test_condition1 or test_condition2 above may be substituted for any of the string1 string2 expressions above, thus very complex tests may be built up.</p></li> <li><p>Ambiguity. If we want to test something, say a path that has the form /path/name, this would be interpreted as a regular expression (see note above). In order to stop this (to disambiguate in the jargon) we create a string and use an escape sequence to remove it, for example, \"/path/name\".</p></li> <li><p>GCI variables. CGI variables contained in a <a href="env_var.htm#qs" class="t-db">QUERY_STRING</a> are not initialised (unlike PHP etc.) before calling SSI. If you need to test such a variable, for instance, myform.html?a=b&amp;c=d then you need to use the form expr="${QUERY_STRING} = /a=b/". <b>Note:</b> The syntax change in 2.3.13+ changes this expression form to expr="%{QUERY_STRING} = /a=b/".</p></li> <li><p>Conditional nesting. Don't. you cannot nest SSI conditional statements.</p></li> </ol> <p><b>Examples</b></p> <pre class="g-c-s"> &lt;!--#if expr="${isJS}" --> ... code for Javascript ... .... &lt;!--#if expr="${isW3C}" --> ..... code for W3C DOM here .... ... &lt;!--#elif expr="${isIE}" --> ... code for MS DHTML DOM .... .... &lt;!--#else --> ... code for NS4.x DOM here ... .... &lt;!--#endif </pre> <p>The above implements the psuedo code shown above for processing Browser user defined variables.</p> <h3 id="set">set Element</h3> <table class="t-m-s"> <tr class="g-h-n"> <td class="w-80">Element</td> <td class="w-80">Attributes</td> <td>Meaning</td> </tr> <tr> <td>set</td> <td></td> <td><p>Sets the value of a variable which may be used by subsequent SSI or CGI programs.</p> <p>Attributes are:</p></td> </tr> <tr> <td></td> <td>var</td> <td>The variable name to be set.</td> </tr> <tr> <td></td> <td>value</td> <td>The value to be placed in the variable. The value may be set explicitly (x=y) or by assignment of an existing variable (environmental or user defined) and in this case is preceded by '$'. If you need to place a $ in a variable use the escape character, for example, var="give_to_me" value="\$1000"</td> </tr> </table> <p id="header"><b>Examples</b></p> <pre class="g-c-n"> &lt;!--#set var="platform" value="Windows" --> &lt;!--#set var="real_mod_date" value="$LAST_MODIFIED" --> </pre> <p><b>Notes</b></p> <ol> <li><p>The first example shows an explicit value (Windows) used to set the variable ($ not required).</p></li> <li><p>The last example sets a user defined variable ('real_mod_date') to the environmental variable LAST_MODIFIED date of <b>this file</b>, we can now use this variable (using #echo) in, say, a standard footer. In this way we can get the last modified date for the 'real' file whereas if we used LAST_MODIFIED directly in our included footer file it would only change when we changed our footer file.</p></li> </ol> <h3 id="printenv">printenv Element</h3> <p>Prints (displays) a list of all the variables (environmental and user defined) and their values. It has no attributes:</p> <pre class="g-c-n"> &lt;!--#printenv --&gt; </pre> <p>Primarily used for de-bugging. Click <a href="show_env.shtml" class="t-db">here</a> to display them for our server. Or if you want the tidy PHP version <a href="../../run/ssi.php" class="t-db">here</a>.</p> <h3 id="echo">echo Element</h3> <table class="t-m-s"> <tr class="g-h-n"> <td class="w-80">Element</td> <td class="w-80">Attributes</td> <td>Meaning</td> </tr> <tr> <td>echo</td> <td></td> <td><p>Prints (displays) a variable (either environmental or user defined). If the the variable has not been set by some method (e.g. BrowserMatch etc.) then 'none' is printed.</p> <p>Allows the following attributes:</p></td> </tr> <tr> <td></td> <td>var</td> <td>The variable name e.g. var="LAST_MODIFIED". Since echo only deals with variables you do not need the '$' sign.</td> </tr> <tr> <td></td> <td>encoding</td> <td>Defines the encoding method used to display the variable. It may take the value 'none' in which case it is not touched, 'url' in which case URL encoding is performed or omitted in which case 'entity' encoding is perfomed (normal for HTML output). Unless you have a special requirement omit this attribute.</td> </tr> </table> <h4 id="headers">Examples</h4> <pre class="g-c-s"> &lt;!--#echo var="really" --> &lt;a href="&lt;!--#echo var="HTTP_REFERER" -->">Go Back&lt;/a> &lt;a href="http://&lt;!--#echo var="HTTP_HOST" -->/abs/ref.html">Hyperlink&lt;/a> </pre> <ol> <li><p>The first example displays a user defined variable which was previously <a title="" href="#set" class="t-db">set</a> by SSI or Apache's BrowserMatch).</p></li> <li><p>The second example illustrates that you can place SSI statements anywhere in your files. In this case using a dynamic back button to return to the calling page (OK so your Back button does the same thing - but with this technique you can save it in say, a mail page, and go back two pages at once (<a href="../php/php_mail.htm" class="t-db">see here)</a>.</p></li> <li><p>The last example is the trivial way we use to create absolute references without any work (on our part). We use it in all our page headers and it allows us to use a test site or our live site without changing anything, finally because it's absolute it will also work at any level in the directory structure etc. etc.). (<a title="" href="absolute" class="t-db">example</a>) <b>Note:</b> the 'http://' string is required because the $HTTP_HOST variable does not supply it - where HTTP_REFERER used in the previous example returns a full URL/URI.</p></li> </ol> <h3 id="exec">exec Element</h3> <table class="t-m-s"> <tr class="g-h-n"> <td class="w-80">Element</td> <td class="w-80">Attributes</td> <td>Meaning</td> </tr> <tr> <td>exec</td> <td></td> <td><p>Allows execution of any shell or CGI script. This feature can be disabled using the Apache <a href="http://httpd.apache.org/docs/mod/core.html#options" class="t-db"> 'Options IncludesNOEXEC'</a> directive otherwise it should be enabled and used on a robustly configured (read secure) server. In particular a server with too liberal write permissions is potentially vulnerable. Make sure that any required write permissions on the web site are limited i.e. contained in a unique sub-directory or other appropriate methods used.</p> <p>Takes the following attributes.</p></td> </tr> <tr> <td></td> <td>cgi</td> <td><p>The value parameter defines the relative path to the script to be executed. If the path doe not begin with a '/' it is assumed to be relative to the current document. The script is run even if the server would not normally recognise it as a cgi program and the directory containing it must be enabled via the use of a 'ScriptAlias' directive or the ExecCGI option.</p> <p>The script is supplied with the QUERY_STRING and PATH_INFO variables. The environmental and user defined variables are also available to this script.</p></td> </tr> <tr> <td></td> <td>cmd</td> <td>Will execute the shell command using /bin/sh. The environmental and user defined variables are available to this script.</td> </tr> </table> <h4>Example</h4> <pre class="g-c-s"> &lt;!--#exec cmd="ls" --> &lt;!--#exec cgi="../hitcounter.php" --> </pre> <p>The first line executes a listing of the current directory and displays the results. The second line executes the php script defined (this could also have been done using the #include variable above.</p> <h3 id="fsize">fsize Element</h3> <table class="t-m-s"> <tr class="g-h-n"> <td class="w-80">Element</td> <td class="w-80">Attributes</td> <td>Meaning</td> </tr> <tr> <td>fsize</td> <td></td> <td>Prints (displays) the size of the file defined by 'file' or 'virtual' below. The measurement value is defined by the <a href="#config" class="t-db"> <b>#config 'sizefmt'</b></a> attribute.</td> </tr> <tr> <td></td> <td>file</td> <td>Defined as being relative to the current directory and below only i.e does not allow '../' nor an absolute path.</td> </tr> <tr> <td></td> <td>virtual</td> <td>Accepts any relative format e.g. '../../' or '/absolute/path/and/file' but only on this server. </td> </tr> </table> <h4>Example</h4> <pre class="codegray"> &lt;p>Download size=&lt;!--#fsize file="download.zip" -->&lt;/p> </pre> <p>Example illustrates use of the element for information.</p> <h3 id="flastmod">flastmod Element</h3> <table class="t-m-s"> <tr class="g-h-n"> <td class="w-80">Element</td> <td class="w-80">Attributes</td> <td>Meaning</td> </tr> <tr> <td>flastmod</td> <td></td> <td><p>Prints (displays) the last modification date of the file defined by either the 'file' or 'virtual' attributes below. This construct is somewhat static but can be incredibly useful if you want to inform users of the latest change to a central file or database i.e. suppose you have a standard file that is updated whenever your cousin takes a bath then you can output on the bottom of every page of your web:</p> <pre class="g-c-s"> 'last bath on &lt;!--#flastmod file="mycousin.bath" -->' </pre> <p>Pretty useful feature.</p></td> </tr> <tr> <td></td> <td>file</td> <td>Defined as being relative to the current directory and below only i.e does not allow '../' nor an absolute path.</td> </tr> <tr> <td></td> <td>virtual</td> <td>Accepts any relative format e.g. '../../' or '/absolute/path/and/file' but only on this server. </td> </tr> </table> <h4>Example</h4> <pre class="g-c-s"> &lt;p>expenses updates &lt;!--#flastmod virtual="../expenses.html" -->.&lt;/p> </pre> <h3 id="time">Time and Date Format Codes</h3> <p>These are parameters to the well known <b>ctime</b> function and may take one or more of the following values:</p> <table class="t-m-s"> <tr class="g-h-n"> <td class="w-100 t-c">Value</td> <td>Meaning</td> </tr> <tr> <td class="t-c">%a</td> <td>Abbreviated weekday name</td> </tr> <tr> <td class="t-c">%A</td> <td>Full weekday name</td> </tr> <tr> <td class="t-c">%b</td> <td>Abbreviated month name</td> </tr> <tr> <td class="t-c">%B</td> <td>Full month name</td> </tr> <tr> <td class="t-c">%c</td> <td>'Locale' formatted date and time</td> </tr> <tr> <td class="t-c">%C</td> <td>Default formatted date and time</td> </tr> <tr> <td class="t-c">%d</td> <td>Day of month (01 - 31)</td> </tr> <tr> <td class="t-c">%D</td> <td>Date as %m/%d/%y</td> </tr> <tr> <td class="t-c">%e</td> <td>Day of month (1 - 31)</td> </tr> <tr> <td class="t-c">%H</td> <td>Hour (00 - 23)</td> </tr> <tr> <td class="t-c">%I</td> <td>Hour (01 - 12)</td> </tr> <tr> <td class="t-c">%j</td> <td>Day of year (001 to 365)</td> </tr> <tr> <td class="t-c">%m</td> <td>Month of year (01 - 12)</td> </tr> <tr> <td class="t-c">%M</td> <td>Minute (00 to 59)</td> </tr> <tr> <td class="t-c">%n</td> <td>Insert new line</td> </tr> <tr> <td class="t-c">%p</td> <td>String containing AM or PM</td> </tr> <tr> <td class="t-c">%r</td> <td>Time as %I:%M:%S</td> </tr> <tr> <td class="t-c">%R</td> <td>Time as %H:%M</td> </tr> <tr> <td class="t-c">%S</td> <td>Seconds (00 to 59)</td> </tr> <tr> <td class="t-c">%t</td> <td>Insert a TAB character</td> </tr> <tr> <td class="t-c">%T</td> <td>Time as %H:%M:%S</td> </tr> <tr> <td class="t-c">%U</td> <td>Week number within year (00 to 53) (Sunday = first day)</td> </tr> <tr> <td class="t-c">%w</td> <td>Day number (0 - 6) (Sunday = 0)</td> </tr> <tr> <td class="t-c">%W</td> <td>Week number within year (00 to 53) (Monday = first day)</td> </tr> <tr> <td class="t-c">%x</td> <td>Country specific date format</td> </tr> <tr> <td class="t-c">%X</td> <td>Country specific time format</td> </tr> <tr> <td class="t-c">%y</td> <td>Year within century</td> </tr> <tr> <td class="t-c">%Y</td> <td>Year as YYYY (4 digits)</td> </tr> <tr> <td class="t-c">%Z</td> <td>Timezone name</td> </tr> </table> <p>You can place any number of the above symbols in an expression interspersed with formatting characters:</p> <pre class="g-c-s"> %A-%B,%Y %T e.g. Monday-July,2001 01:12:23 </pre> <p><a href="#contents"><img class="i-u" src="../../../images/go_up.gif" alt="up icon"></a></p> <h2 id="variables">User Variables and Browser Type</h2> <p>We set global Apache variables that describe the client browser environment. <a href="browser_sniffing.html" class="t-db">If you want more info about what we do</a>.</p> <table class="t-m-s"> <tr class="g-h-n"> <td class="t-c w-100">Variable</td> <td>Meaning</td> </tr> <tr> <td class="t-c">isJS</td> <td>If set (TRUE) the client is a browser from any company that supports a generic version 4 feature set, specifically it supports DHTML, CSS and Javascript 1.3 compatibility at the CODE level but the object models may be different. If not set (FALSE) the browser either does not support Javascript or supports a degenerate version of Javascript.</td> </tr> <tr> <td class="t-c">isIE</td> <td>If set (TRUE) the client is an MSIE browser that supports Microsofts DHTML Object Model. If not set (FALSE) the browser supports the Netscape 4.x Object model (defined by Javascript 1.3).</td> </tr> <tr> <td class="t-c">isW3C</td> <td>If set (TRUE) the client browser supports the W3C Document Obect Model Level-2. Currently this is assumed to be only MSIE 5.5+, Opera 7.54+ and browsers based on Gecko Netscape 6+. If not set (FALSE) the browser does not support the W3C DOM.</td> </tr> </table> <p>The psuedo code to process these variables is:</p> <pre class="g-c-s"> If isJS not set (FALSE) Exit no DHTML, CSS or Javascript support in browser If isW3C set W3C CSS-2 and DOM supported Else If isIE set MS DHTML DOM and CSS Else CSS and DOM are NS Javascript 1.3 </pre> <p>We use these variables to generate browser specific javascript and CSS style sheets using SSI <a href="#conditional" class="t-db">conditional elements</a> in included files.</p> <p><a href="#contents"><img class="i-u" src="../../../images/go_up.gif" alt="up icon"></a></p> <h2 id="dates">Example - Page Changed and Copyright Date in Footer</h2> <p>The page modified: and Copyright dates at the foot of every page on our site are generated by SSI in a single included footer file.</p> <p>Each page on our site is laid out as shown below:</p> <pre class="g-c-s"> &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> &lt;html> &lt;head> &lt;title>Apache - Server Side Includes&lt;/title> &lt;!-- include files covering page source, meta data, javascript, CSS and page banners --> &lt;body> &lt;!-- page body text in enclosing div --> &lt;div class="l-c"> stunning page content &lt;/div> &lt;!-- include left and right menus --> &lt;!-- site wide footer --> &lt;!--#include virtual="../../templates/footer.shtml" --> &lt;/body> &lt;/html> </pre> <p>This is the contents of the included footer.shtml file (we've omitted all the formatting HTML 'cos it does not affect the technique - but use page source in your browser if you are insatiably curious) and it generates the end copyright year to reflect the current date and uses the real_date variable set in the parent page:</p> <pre class="g-c-s"> &lt;!-- standard footer full width --> &lt;!-- set time format to 4 digit year --> &lt;!--#config timefmt="%Y" --> Copyright &copy; 1994 - &lt;!--#echo var="DATE_LOCAL" --> ZyTrax, Inc. &lt;!-- format date --> &lt;!--#config timefmt="%B %d %Y" --> Page modified: &lt;!--#echo var="LAST_MODIFIED" -->. </pre> <p>The LAST_MODIFIED variable is set for the page/url/uri requested by the user and is not modified to reflect any included files.</p> <p><a href="#contents"><img class="i-u" src="../../../images/go_up.gif" alt="up icon"></a></p> <h2 id="page">Example - Page Source Comment</h2> <p>We set a page source comment in every page using standard SSI elements and the variable HTTP_HOST and REQUEST_URI as shown in the following fragment. Why do we do it? - because it seemed like a good idea at the time. If you look at page source you will also see that we spell 'originated' incorrectly on almost every page (we fixed it on this page) - so much for a cut and paste technique!</p> <pre class="g-c-s"> &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> &lt;html> &lt;head> &lt;title>Apache - Server Side Includes&lt;/title> &lt;!-- page source statement --> &lt;!-- this page originated from http://&lt;!--#echo var="HTTP_HOST" -->&lt;!--#echo var="REQUEST_URI" --> --> &lt;!-- include files covering meta data javascript, CSS and page banners --> &lt;body> &lt;!-- page body text in enclosing div --> &lt;div class="l-c"> stunning page content &lt;/div> &lt;!-- include left, right menus and footer --> &lt;/body> &lt;/html> </pre> <p><a href="#contents"><img class="i-u" src="../../../images/go_up.gif" alt="up icon"></a></p> <h2 id="absolute">Example - Absolute Page References with SSI</h2> <p>Relative references in href attributes typically take the form:</p> <pre class="g-c-s"> &lt;a href="../tech">tech home&lt;/a>&lt;br> </pre> <p>Which is short but when you are including files requires a different include file for every level in the hierarchy since the relative reference changes.</p> <p>To keep things simple we maintain single site wide files for menus that use absolute addressing generated by SSI as shown in the fragment below (which is the same as that shown above using relative addressing):</p> <pre class="g-c-n"> &lt;a href="http://&lt;!--#echo var="HTTP_HOST" -->/tech">tech home&lt;/a>&lt;br> </pre> <p>This works for any level in the hierarchy and on our test (pre-publish) site.</p> <p><a href="#contents"><img class="i-u" src="../../../images/go_up.gif" alt="up icon"></a></p> <hr> <p class="p-m-n"><br>Problems, comments, suggestions, corrections (including broken links) or something to add? Please take the time from a busy life to 'mail us' (at top of screen), the webmaster (below) or <a href="javascript:mailus('info-support','zytrax.com','Support Issue')" class="t-db">info-support at zytrax</a>. You will have a warm inner glow for the rest of the day.</p> <!-- end body (l-c) div --> </div> <div class="l-l"> <!-- left hand navigation --> <div class="n-l"> <p class="c-g t-b t-o m-h5 t-r">Tech Stuff</p> <!-- first row of navigation CSS format --> <ul class="n-l1p"> <li class="n-l1p-e"> <a href="http://www.zytrax.com/tech" class="n-l-c">tech home</a> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a title="Digital Audio - primers, calculators, equalization, frequency tables, file formats, glossary - a mere splash in the ocean" href="http://www.zytrax.com/tech/audio/" class="n-l-c">audio stuff</a> <ul class="n-l2"> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/audio/sound.html" class="n-l-f">sound primer</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/audio/digital-sound.html" class="n-l-f">digital primer</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/audio/audio.html" class="n-l-f">note frequencies</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/audio/equalization.html" class="n-l-f">eq, meters &amp; fft</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/audio/calculator.html" class="n-l-f">calculators</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/audio/formats.html" class="n-l-f">files &amp; codecs</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/audio/glossary.html" class="n-l-f">glossary</a></li> </ul> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a title="Browser IDs, SSIs, Apache Configuration, regular expressions" href="http://www.zytrax.com/tech/web/" class="n-l-c">web stuff</a> <ul class="n-l2"> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/web/browser_ids.htm" class="n-l-f">browser ids</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/web/mobile_ids.html" class="n-l-f">mobile_ids</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/web/env_var.htm" class="n-l-f">apache env vars</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/web/ssi.htm" class="n-l-f">apache ssi</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/css/workarounds.html#popout" class="n-l-f">css popout menus</a></li> <li class="n-l2-e"><a title="most of those annoying HTML entity codes that we forget all the time" href="http://www.zytrax.com/tech/web/entities.html" class="n-l-f">html entities</a></li> <li class="n-l2-e"><a title="Decimal to Hexidecimal to Binary conversion - even Octal!" href="http://www.zytrax.com/tech/protocols/hex.html" class="n-l-f">dec > hex > bin</a></li> </ul> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a href="http://www.zytrax.com/tech/dom/" class="n-l-c">dom stuff</a><br> <ul class="n-l2"> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/dom/guide.html" class="n-l-f">dom guide</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/dom/w3c_dom.html" class="n-l-f">page explorer</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/dom/navigate.html" class="n-l-f">dom navigation</a></li> </ul> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a title="CSS is about a lot more than STYLE. Wheezes, table-less layouts, CSS pop-ups, CSS Shortcuts" href="http://www.zytrax.com/tech/css/" class="n-l-c">css stuff</a> <ul class="n-l2"> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/css/layoutnotes.html" class="n-l-f">css liquid design</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/css/workarounds.html#popout" class="n-l-f">css popout menus</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/css/workarounds.html" class="n-l-f">css notes</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/css/syntax.html" class="n-l-f">css syntax</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/css/shortcut.html" class="n-l-f">css short-forms</a></li> </ul> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a title="includes PHP, Ruby and some Java stuff (all about obscure solutions to stupid problems)" href="http://www.zytrax.com/tech/lang/" class="n-l-c">language stuff</a> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a title="quick overview 'cos we always forget - not that we ever knew much - now includes a nifty browser-based tester" href="http://www.zytrax.com/tech/web/regex.htm" class="n-l-c">regex stuff</a> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a title="rfc ordered by subject" href="http://www.zytrax.com/tech/rfcs/" class="n-l-c">rfc stuff</a> <ul class="n-l2"> <li title="dns rfcs" class="n-l2-e"><a href="http://www.zytrax.com/books/dns/apd/" class="n-l-f">dns rfcs</a></li> <li title="ldap rfcs" class="n-l2-e"><a href="http://www.zytrax.com/books/ldap/apc/" class="n-l-f">ldap rfcs</a></li> <li title="ipv6 rfcs" class="n-l2-e"><a href="http://www.zytrax.com/tech/protocols/ipv6.html#rfcs" class="n-l-f">ipv6 rfcs</a></li> <li title="tls/x.509 rfcs" class="n-l2-e"><a href="http://www.zytrax.com/tech/survival/ssl.html#rfcs" class="n-l-f">tls/x.509 rfcs</a></li> <li title="some other subjects - we only update these when we are active - some lists are consequently long in the tooth" class="n-l2-e"><a href="http://www.zytrax.com/tech/rfcs" class="n-l-f">other rfcs</a></li> </ul> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a title="TCP/IP, IPv4, IPv6, ISDN, LAN, VoIP, ITU Multi-Media" href="http://www.zytrax.com/tech/protocols/" class="n-l-c">protocol stuff</a> <ul class="n-l2"> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/protocols/tcp.html" class="n-l-f">tcp, udp, icmp</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/protocols/ip-classes.html" class="n-l-f">ipv4</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/protocols/ipv6.html" class="n-l-f">ipv6</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/protocols/isdn/" class="n-l-f">isdn</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/survival/ssl.html" class="n-l-f">ssl/tls/x.509</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/ss7/" class="n-l-f">ss7 &amp;sigtran</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/protocols/lan/" class="n-l-f">802.3 lan</a></li> </ul> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a title="PC Parallel Ports, LAN wiring, RS232, Centronics, DIN" href="http://www.zytrax.com/tech/layer_1/" class="n-l-c">cable stuff</a> <ul class="n-l2"> <li title="10baseT, 100base-TX/T4, 1000baseT, 10Gbase-T, RJ45, STP" class="n-l2-e"><a href="http://www.zytrax.com/tech/layer_1/cables/tech_lan.htm" class="n-l-f">lan pinouts</a></li> <li title="mixing telephony and 802.3 LAN can be done on cat5/5e/6 wiring" class="n-l2-e"><a href="http://www.zytrax.com/tech/layer_1/mixed.html" class="n-l-f">lan &amp; telephone</a></li> <li title="RS 232 pinouts on db9, db24 and T1" class="n-l2-e"><a href="http://www.zytrax.com/tech/layer_1/cables/tech_rs232.htm" class="n-l-f">rs232 pinouts</a></li> <li class="n-l2-e"><a href="http://www.zytrax.com/tech/layer_1/cables/heavy.htm" class="n-l-f">serial primer</a></li> <li title="USB 2.0, 3.0, 3.1 and 3.2 plus Firewire (i.Link) IEE 1394" class="n-l2-e"><a href="http://www.zytrax.com/tech/pc/serial.html" class="n-l-f">usb &amp; firewire</a></li> <li title="some information about display and monitors/console interfaces inclusing VGA, HDMI, DVI and Thunderbolt" class="n-l2-e"><a href="http://www.zytrax.com/tech/pc/monitors.htm" class="n-l-f">displays</a></li> <li title="modular jack is the term we should use for those telephone and lan connectors" class="n-l2-e"><a href="http://www.zytrax.com/tech/layer_1/cables/cables_jacks.htm" class="n-l-f">modular jacks</a></li> </ul> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a title="10baseT, 100base-TX/T4, 1000baseT, 10Gbase-T, RJ45, STP" href="http://www.zytrax.com/tech/layer_1/cables/tech_lan.htm" class="n-l-c">lan wiring</a> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a title="DB9, DB25 pinouts, RJ45 serial, T1 and RS standards alphabet soup" href="http://www.zytrax.com/tech/layer_1/cables/tech_rs232.htm" class="n-l-c">rs232 wiring</a> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a title="Decimal to Hex and Binary conversion table - even a description of Octal!" href="http://www.zytrax.com/tech/protocols/hex.html" class="n-l-c">dec > hex > bin</a> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a title="character sets ain't as simple as they look" href="http://www.zytrax.com/tech/codes.htm" class="n-l-c">character sets</a> <ul class="n-l2"> <li title="pretty much all the characters sets in the known universe including utf-7, 8 and 16" class="n-l2-e"><a href="http://www.zytrax.com/tech/characters/" class="n-l-f">character sets</a></li> <li title="ascii variant of international reference alphabet 5 (ira5)" class="n-l2-e"><a href="http://www.zytrax.com/tech/codes.htm" class="n-l-f">ascii codes</a></li> <li title="international reference alphabet 5 (ascii's cousin)" class="n-l2-e"><a href="http://www.zytrax.com/tech/ia5.html" class="n-l-f">ia5 codes</a></li> <li title="all that &trade; &amp; &copy; stuff" class="n-l2-e"><a href="http://www.zytrax.com/tech/web/entities.html" class="n-l-f">html entities</a></li> <li title="silly page containing a bunch of fonts in various sizes including your PCs defaults" class="n-l2-e"><a href="http://www.zytrax.com/tech/web/fonts.html" class="n-l-f">web fonts</a></li> </ul> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a title="The T series, E series and J series and then all that optical stuff (OC-12 etc.)" href="http://www.zytrax.com/tech/data_rates.htm" class="n-l-c">data rate stuff</a> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a title="Even us electronic guys gotta know how to screw it together, if you get our drift" href="http://www.zytrax.com/tech/mech/" class="n-l-c">mechanical stuff</a> <ul class="n-l2"> <li title="fastener (screw) head styles - surprising number of choices" class="n-l2-e"><a href="http://www.zytrax.com/tech/mech/heads.htm" class="n-l-f">head styles</a></li> <li title="threads for imperial (UNF, UNC) &amp; metric sizes" class="n-l2-e"><a href="http://www.zytrax.com/tech/mech/threads.htm" class="n-l-f">threads</a></li> </ul> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a title="A collection of howtos including Samba3 as PDC, FreeBSD firewalls" href="http://www.zytrax.com/tech/howtos/" class="n-l-c">howto stuff</a> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a title="A collection of survival guides - quick overviews - to popular software" href="http://www.zytrax.com/tech/survival/" class="n-l-c">survival stuff</a> <ul class="n-l2"> <li title="tls and x.509 (ssl) certificates - warning: headache inducing stuff" class="n-l2-e"><a href="http://www.zytrax.com/tech/survival/ssl.html" class="n-l-f">ssl/tls/x.509</a></li> <li title="Abstract Syntax Notation. 1 (ASN.!) and Distinguished Encoding Rules (DER) - not for the faint hearted. Pass the pain medication, we feel a headache coming on." class="n-l2-e"><a href="http://www.zytrax.com/tech/survival/asn1.html" class="n-l-f">ASN.1 &amp; DER</a></li> <li title="Kerberos is great - but tough, oh my, tough stuff" class="n-l2-e"><a href="http://www.zytrax.com/tech/survival/kerberos.html" class="n-l-f">kerberos</a></li> <li title="We've used postfix for years but always forget which of the 27 million parameters to use" class="n-l2-e"><a href="http://www.zytrax.com/tech/survival/postfix.html" class="n-l-f">postfix</a></li> <li title="Symetric, asymetric, MACs, hashes - eye watering stuff" class="n-l2-e"><a href="http://www.zytrax.com/tech/survival/encryption.html" class="n-l-f">encryption</a></li> <li title="Just what time is it in Kuala Lumpur, and what's that got to do with cron?" class="n-l2-e"><a href="http://www.zytrax.com/tech/survival/cron.html" class="t-db">cron</a></li> <li title="Gotta love wxWidgets - free, fantastic, flexible - but hard to see the wood for the trees sometimes" class="n-l2-e"><a href="http://www.zytrax.com/tech/survival/wxwidgets.html" class="n-l-f">wxWidgets</a></li> </ul> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a title="Our wireless overview, Calculators, Fresnel zones, links to 'heavy' stuff, some early 802.11 stuff (mostly wi-fi related)" href="http://www.zytrax.com/tech/wireless/" class="n-l-c">wireless stuff</a> <ul class="n-l2"> <li title="our irreverent general intro to wirelss - purist will not like this page" class="n-l2-e"><a href="http://www.zytrax.com/tech/wireless/intro.htm" class="n-l-f">overview</a></li> <li title="wireless calculators for system budgets, free-space loss, fresnel effects and a bunch of other stuff" class="n-l2-e"><a href="http://www.zytrax.com/tech/wireless/calc.htm" class="n-l-f">calculators</a></li> <li title="fresnel effect explanation - well, we can understand it" class="n-l2-e"><a href="http://www.zytrax.com/tech/wireless/fresnel.htm" class="n-l-f">fresnel effects</a></li> <li title="our outrageously biased description of frequency hopping versus direct sequence for spread spectrum" class="n-l2-e"><a href="http://www.zytrax.com/tech/wireless/fh_ds.htm" class="n-l-f">fh vs ds</a></li> <li title="some terminology covering 802 standards and modulation techniques" class="n-l2-e"><a href="http://www.zytrax.com/tech/wireless/soup.html" class="n-l-f">wireless soup</a></li> </ul> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a title="Pinouts - USB, DIN, Firewire, VGA, DVI, HDMI, DisplayPort and Thunderbolt, I/O interface speeds, Screen sizes including HD" href="http://www.zytrax.com/tech/pc/" class="n-l-c">pc stuff</a> <ul class="n-l2"> <li title="din and mini-din for older PCs" class="n-l2-e"><a href="http://www.zytrax.com/tech/pc/din.htm" class="n-l-f">din &amp; mini-din</a></li> <li title="802.3 LAN stuff" class="n-l2-e"><a href="http://www.zytrax.com/tech/layer_1/cables/tech_lan.htm" class="n-l-f">802.3 lan</a></li> <li title="connection of monitors has changed over the years from clunky VGA to svelte HDMI - all the pinouts you could hope for" class="n-l2-e"><a href="http://www.zytrax.com/tech/pc/monitors.htm" class="n-l-f">monitor pinouts</a></li> <li title="serial (db9, db24) connections - slow but trusty" class="n-l2-e"><a href="http://www.zytrax.com/tech/layer_1/cables/tech_rs232.htm" class="n-l-f">serial stuff</a></li> <li title="usb pinouts and descriptions of power levels for usb 1, 2 and 3 - also includes firewire" class="n-l2-e"><a href="http://www.zytrax.com/tech/pc/serial.html" class="n-l-f">usb &amp; firewire</a></li> <li title="pc interfaces are changing and getting faster - we can never keep up - list of interfaces and their speeds" class="n-l2-e"><a href="http://www.zytrax.com/tech/pc/interfaces.html" class="n-l-f">pc interfaces</a></li> <li title="we get confused about most things - just what is 1080p - pc and tv screen resolution table with some explanations" class="n-l2-e"><a href="http://www.zytrax.com/tech/pc/resolution.html" class="n-l-f">screen resolutions</a></li> </ul> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a title="Electronic glossary, some old experiments with 3.3/5V protection and early BGA designs" href="http://www.zytrax.com/tech/electronics/" class="n-l-c">electronic stuff</a> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a title="ragbag collection of links that we publish from time to time - maybe useful, maybe not" href="http://www.zytrax.com/links" class="n-l-c">tech links</a> </li> </ul> <ul class="n-l1p"> <li class="n-l1p-e"> <a title="Our DNS and LDAP for Rocket Scientists guides" href="http://www.zytrax.com/books" class="n-l-c">open guides</a> <ul class="n-l2"> <li title="dns for rocket scientists" class="n-l2-e"><a href="http://www.zytrax.com/books/dns/" class="n-l-f">dns guide</a></li> <li title="ldap for rocket scientists" class="n-l2-e"><a href="http://www.zytrax.com/books/ldap/" class="n-l-f">ldap guide</a></li> </ul> </li> </ul> <p class="t-r"> <a title="RSS (2.0) Feed - right click on icon, select 'Copy Link URL' or 'Copy Shortcut', paste into RSS Feed Reader, or drag and drop into RSS Feed Reader" href="http://www.zytrax.com/zytrax.rss" class="n-l-c"><img class="w-32 center" src="http://www.zytrax.com/images/rss.png" alt="RSS Feed Icon"></a> </p> <p class="p-b-h t-r">If you are happy it's OK - but your browser is giving a less than optimal experience on our site. You could, at no charge, upgrade to a W3C standards compliant browser such as <a href="http://www.mozilla.org" class="t-db">Firefox</a></p> </div> </div> <div class="l-r"> <!-- right menu --> <div class="w-150"> <!-- SiteSearch Google --> <p class="c-g t-b t-o m-h8">Search</p> <form class="f-b-n" method="get" action="http://www.google.com/custom" target="_top"> <table> <tr> <td style="white-space: nowrap"> <input type="hidden" name="domains" value="www.zytrax.com"> <input class="b-lg" type="text" name="q" size="16" maxlength="255" value=""> </td></tr> <tr> <td style="white-space: nowrap"> <table> <tr> <td> <input type="radio" name="sitesearch" value="" checked="checked"><span class="t-s">web</span> </td> <td> <input type="radio" name="sitesearch" value="www.zytrax.com" ><span class="t-s">zytrax.com</span> </td> </tr> </table> <input class="b-lg" type="submit" name="sa" value="Google Search"> <input type="hidden" name="client" value="pub-9419480011552853"> <input type="hidden" name="forid" value="1"> <input type="hidden" name="ie" value="ISO-8859-1"> <input type="hidden" name="oe" value="ISO-8859-1"> <input type="hidden" name="safe" value="active"> <input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;LH:50;LW:355;L:http://www.zytrax.com/images/zytrax-info-google.gif;S:http://www.zytrax.com/tech;FORID:1;"> <input type="hidden" name="hl" value="en"> </td></tr></table> </form> <!-- SiteSearch Google --> <!-- share page feature --> <div class="t-h"><p><span class="t-g">Share</span></p> <div class="t-h-1"> Icons made by <a href="https://www.flaticon.com/authors/icomoon" title="Icomoon">Icomoon</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a> is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a></div></div> <a href="http://www.facebook.com/share.php?u=http://www.zytrax.com/tech/web/ssi.htm&amp;h=Tech%20Stuff%20-%20Apache%20Server%20Side%20Includes%20(SSI%20and%20XSSI)"><img class="w-32" title="add page to facebook" src="http://www.zytrax.com/images/facebook.png" alt="share page via facebook"></a> <a href="http://twitter.com/home/?status=Useful%20page%20http://www.zytrax.com/tech/web/ssi.htm"><img class="w-32" title="tweet this page" src="http://www.zytrax.com/images/twitter.png" alt="tweet this page"></a> <p class="c-g t-b t-o m-h5">Page<p> <a class="a-n" href="http://www.zytrax.com/feedback.htm"><img class="w-32" title="Page comment feature" src="http://www.zytrax.com/images/mail.png" alt="email us"></a> <a class="a-n" href="http://www.zytrax.com/run/mailpage.php"><img class="w-32" title="Send to a friend" src="http://www.zytrax.com/images/mailfriend.png" alt="Send to a friend feature"></a> <a class="a-n" href="#" onclick="window.print();return false;"><img class="w-32" title="print page" src="http://www.zytrax.com/images/printpage.png" alt="print this page"></a> <a class="a-n" title="View page full width - suppresses left and right hand menus" href="http://www.zytrax.com/tech/web/ssi.htm?pf=yes"><img class="w-32" src="http://www.zytrax.com/images/fullwidth.png" alt="Display full width page"></a> <a class="a-n" href="#" onclick="fontchange('d');return false;"><img class="w-32" title="Decrease font size" src="http://www.zytrax.com/images/smaller.png" alt="Decrease font size"></a> <a class="a-n" href="#" onclick="fontchange('i');return false;"><img class="w-32" title="Increase font size" src="http://www.zytrax.com/images/bigger.png" alt="Increase font size"></a> <p class="c-g t-b t-o m-h5">Resources</p> <p class="c-g t-b t-o m-h5">HTML Stuff</p> <p> <a title="It was the Last HTML standard - the future was XHTML - but HTML 5 rises from the ashes" href="http://www.w3.org/TR/html4/" target="_blank" class="w-db">W3C HTML 4.01</a><br> <a title="HTML is alive and well and moving toward HTML5 - the objective being an incremental standard - reconciling HTML4 and XHTML - in your dreams?" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/" target="_blank" class="w-db">HTML5 (WHATWG)</a><br> <a title="HTML4 - HTML5 differences - well today's differences - and tomorrow's. Who knows." href="http://dev.w3.org/html5/html4-differences/" target="_blank" class="w-db">HTML4 vs HTML5</a><br> <a title="W3C current HTML5 Reference" href="http://dev.w3.org/html5/html-author/" target="_blank" class="w-db">HTML5 Reference</a><br> <a title="Excellent tool and great for finding page bugs as well" href="http://validator.w3.org/" target="_blank" class="w-db">W3C Page Validator</a><br> <a title="Quick list of valid DTD's - explains one of life's great mysteries" href="http://www.w3.org/QA/2002/04/valid-dtd-list.html" target="_blank" class="w-db">W3C DOCTYPE</a> </p> <p class="c-g t-b t-o m-h5">CSS Stuff</p> <p> <a title="CSS2.1 - the only approved spec" href="http://www.w3.org/TR/CSS2/" target="_blank" class="w-db">W3C CSS2.1</a><br> <a title="CSS2.2 - the lastest non-approved draft" href="https://drafts.csswg.org/css2/" target="_blank" class="w-db">W3C CSS2.2</a><br> <a title="CSS2.2 - informative (not a standard) default style sheet" href="http://www.w3.org/TR/REC-CSS2/sample.html" target="_blank" class="w-db">Default Styles</a><br> <a title="CSS3 - Selectors" href="http://www.w3.org/TR/css3-selectors/" target="_blank" class="w-db">CSS3 Selectors</a><br> <a title="CSS3 - standardized media queries" href="http://www.w3.org/TR/css3-mediaqueries/" target="_blank" class="w-db">CSS 3 Media Queries</a><br> <a title="CSS3 - color names and values" href="http://www.w3.org/TR/2003/CR-css3-color-20030514/#html4" target="_blank" class="w-db">CSS 3 Colors</a> </p> <p class="c-g t-b t-o m-h5">DOM Stuff</p> <p> <a title="W3C's main DOM site with links to all their DOM documentation" href="http://www.w3c.org/DOM/" target="_blank" class="w-db">W3C DOM</a><br> <a title="W3C DOM 3 Core recommendation" href="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/" target="_blank" class="w-db">W3C DOM 3 Core</a><br> <a title="Dom 3 Events" href="http://www.w3.org/TR/2003/NOTE-DOM-Level-3-Events-20031107/" target="_blank" class="w-db">W3C 3 Events</a> </p> <p class="c-g t-b t-o m-h5">Accessibility</p> <p> <a title="Excellent resource - research based as opposed to opnions. The guide is superb" href="http://www.usability.gov/" target="_blank" class="w-db">usability.gov</a><br> <a title="Bit heavy on motherhood." href="http://www.w3.org/WAI/guid-tech.html" target="_blank" class="w-db">W3C - WAI</a><br> <a title="Used to be the yale style guide - now renamed - good stuff" href="http://www.webstyleguide.com/index.html?/contents.html" target="_blank" class="w-db">Web Style Guide</a><br> <a title="Good background explanations such as how screen readers work and some useful tools - perhaps a bit light on research references" href="http://www.webaim.org/" target="_blank" class="w-db">WebAim.org</a><br> </p> <p class="c-g t-b t-o m-h5">Useful Stuff</p> <p> <a title="Good solid stuff well presented and paced" href="http://www.quirksmode.org/" target="_blank" class="w-db">Peter-Paul Koch</a><br> <a title="Outspoken site on use of Web Standards - many excellent articles" href="http://www.alistapart.com/" target="_blank" class="w-db">A List Apart</a><br> <a title="Some really great uses of CSS - is this CSS's future?" href="http://www.meyerweb.com/eric/css/" target="_blank" class="w-db">Eric Meyer on CSS</a><br> <a title="Real world layouts - highly pratical site for us hard working folks" href="http://glish.com/css/" target="_blank" class="w-db">glish.com</a> </p> <p class="c-g t-b t-o m-h5">Our Stuff</p> <p> <a href="http://www.zytrax.com/tech/dom/" >Our DOM Pages</a><br> <a title="Overview of navigating the DOM using Javascript" href="http://www.zytrax.com/tech/dom/navigate.html" >DOM Navigation</a><br> <a title="CSS Techniques and workarounds, including 3 column layout, pop-ups and more" href="http://www.zytrax.com/tech/css/layoutnotes.html" >Liquid Layout</a><br> <a title="CSS short forms to avoid all that 'border-with-right' stuff" href="http://www.zytrax.com/tech/css/shortcut.html" >CSS Short Cuts</a><br> <a title="CSS overview with selectors and W3C spec links" href="http://www.zytrax.com/tech/css/syntax.html" >CSS overview</a><br> <a title="CSS one page overview with links to all the W3C docs" href="http://www.zytrax.com/tech/css/syntax.html" >CSS One Page</a> </p> <p class="c-g t-b t-o m-h5">Javascript Stuff</p> <p> <a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm" target="_blank" class="w-db">ECMA-262</a> </p> </div> <p class="c-g t-b t-o">Site</p> <a class="a-n" href="http://www.zytrax.com/about_site.htm#css"><img class="w-32" src="http://www.zytrax.com/images/css.png" alt="CSS Technology"></a> <a class="a-n" href="http://www.zytrax.com/security/spf.html"><img title="SPF Record Conformant Domain" class="w-32" src="http://www.zytrax.com/images/spf.png" alt="SPF Record Conformant Domain"></a> </div> <div class="l-f"> <!-- standard footer full width --> <table> <tr> <td class="p-f-s t-l"> Copyright &copy; 1994 - 2024 ZyTrax, Inc.<br> All rights reserved. <a href="http://www.zytrax.com/legal.html" class="p-f-s">Legal</a> and <a href="http://www.zytrax.com/privacy.html" class="p-f-s">Privacy</a> </td> <td class="t-c"><a href="https://www.zytrax.com" target="_blank" class="p-f-s">site by zytrax</a><br> <a href="https://www.javapipe.com" target="_blank" class="p-f-s">hosted by javapipe.com</a></td> <td class="p-f-s t-r"> <a href="javascript:mailus('web-master','zytrax.com','About Web site')" class="p-f-s">web-master at zytrax</a><br> Page modified: January 20 2022. </td> </tr> </table> </div> <!-- pop-out tables only if Javascript supported --> <!-- only css menus --> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10