{"id":421,"date":"2015-06-29T20:35:35","date_gmt":"2015-06-29T20:35:35","guid":{"rendered":"https:\/\/www.eskimo.com\/support\/?page_id=421"},"modified":"2015-07-15T02:08:32","modified_gmt":"2015-07-15T02:08:32","slug":"server-side-includes","status":"publish","type":"page","link":"https:\/\/www.eskimo.com\/support\/web-space\/server-side-includes\/","title":{"rendered":"Server Side Includes"},"content":{"rendered":"<p style=\"text-align: center;\"><span style=\"font-family: arial,helvetica,sans-serif; font-size: 20pt; color: #008000;\">Server Side Includes<\/span><\/p>\n<p><span style=\"font-size: 12pt;\"><span style=\"font-family: arial,helvetica,sans-serif;\">\u00a0\u00a0\u00a0\u00a0 Server side includes are allowed with the exception of Exec which is <\/span><span style=\"font-family: arial,helvetica,sans-serif;\">disallowed. Although it is slightly more work (you have to spit out a <\/span><span style=\"font-family: arial,helvetica,sans-serif;\">header), just about anything you could do with Exec can be done with a CGI <\/span><span style=\"font-family: arial,helvetica,sans-serif;\">script. The reason Exec is disallowed is that, unlike CGI scripts, it is <\/span><span style=\"font-family: arial,helvetica,sans-serif;\">not restricted to one directory and thus it is easy to accidentally <\/span><span style=\"font-family: arial,helvetica,sans-serif;\">execute the wrong thing with unknown and possibly nasty consequences.\u00a0 Also, CGI and PHP is executed with your user ID, there is no method of doing that with SSI.<br \/>\n<\/span><\/span><\/p>\n<p><span style=\"font-size: 12pt;\"><span style=\"font-family: arial,helvetica,sans-serif;\">\u00a0\u00a0\u00a0\u00a0 Normally, &#8220;.html&#8221; files are not parsed for SSI directives. There are <\/span><span style=\"font-family: arial,helvetica,sans-serif;\">two ways to tell the server to parse a file for SSI directives. If you <\/span><span style=\"font-family: arial,helvetica,sans-serif;\">give the file an extension of &#8220;.shtml&#8221; the server will parse the file for <\/span><span style=\"font-family: arial,helvetica,sans-serif;\">SSI directives. Also, if you set the user execute bit the file will be <\/span><span style=\"font-family: arial,helvetica,sans-serif;\">parsed for SSI directives. This is known as the Apache X-bit hack, <\/span><span style=\"font-family: arial,helvetica,sans-serif;\">although today it is a standard feature. To do this type:<\/span><\/span><\/p>\n<pre><span style=\"font-size: 12pt;\">     chmod u+x file.html\r\n<\/span><\/pre>\n<p><span style=\"font-family: arial,helvetica,sans-serif; font-size: 12pt;\">\u00a0\u00a0\u00a0\u00a0 The include syntax to use inside an HTML file to include another file is:<\/span><\/p>\n<pre><span style=\"font-size: 12pt;\">     &lt;!--#include file=\"included.html\" --&gt;\r\n<\/span><\/pre>\n<p><span style=\"font-size: 12pt;\"><span style=\"font-family: arial,helvetica,sans-serif;\">\u00a0\u00a0\u00a0\u00a0 Cache control is no longer done with the group execute bit. This must <\/span><span style=\"font-family: arial,helvetica,sans-serif;\">now be done with a &#8220;.htaccess&#8221; file. This method is far more <\/span><span style=\"font-family: arial,helvetica,sans-serif;\">flexible in that not only can you specify what and what not to cache, but <\/span><span style=\"font-family: arial,helvetica,sans-serif;\">you can specify how long to cache it and with what criteria. See <a href=\"http:\/\/httpd.apache.org\/docs\/current\/mod\/mod_expires.html\">http:\/\/httpd.apache.org\/docs\/current\/mod\/mod_expires.html <\/a><\/span><span style=\"font-family: arial,helvetica,sans-serif;\">for details.<\/span><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Server Side Includes \u00a0\u00a0\u00a0\u00a0 Server side includes are allowed with the exception of Exec which is disallowed. Although it is slightly more work (you have to spit out a header), just about anything you could do with Exec can be &hellip; <a href=\"https:\/\/www.eskimo.com\/support\/web-space\/server-side-includes\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":377,"menu_order":0,"comment_status":"open","ping_status":"open","template":"showcase.php","meta":{"footnotes":""},"class_list":["post-421","page","type-page","status-publish","hentry","wpautop"],"_links":{"self":[{"href":"https:\/\/www.eskimo.com\/support\/wp-json\/wp\/v2\/pages\/421","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.eskimo.com\/support\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.eskimo.com\/support\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.eskimo.com\/support\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.eskimo.com\/support\/wp-json\/wp\/v2\/comments?post=421"}],"version-history":[{"count":0,"href":"https:\/\/www.eskimo.com\/support\/wp-json\/wp\/v2\/pages\/421\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/www.eskimo.com\/support\/wp-json\/wp\/v2\/pages\/377"}],"wp:attachment":[{"href":"https:\/\/www.eskimo.com\/support\/wp-json\/wp\/v2\/media?parent=421"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}