Oldschool SSI HTML Includes

Developing front-end only and don’t want to introduce a server language just to include repetitive markup?

Add this to your .htaccess file:

1
2
3
4
AddType text/html .shtml
AddHandler server-parsed .html
AddHandler server-parsed .shtml
Options Indexes FollowSymLinks Includes

Then include partial HTML files using these:

1
2
<!--#include file="widgets/head.html" -->
<!--#include file="widgets/header.html" -->

Published by Walt

I code marketing websites using HTML, CSS, SCSS, JavaScript, jQuery, and PHP. Often I use front-end frameworks like Bootstrap or Foundation. I go 100% custom when it comes to WordPress: custom themes, post types, taxonomies, templates, fields and plugins—all based on what the client truly needs. I've also been known to dabble in HubSpot and Drupal. I integrate sites with CRMs and external content sources. Don't even get me started on tracking. I aim for speed, security, standards-compliance, browser- and device-consistency, WCAG-adherent accessibility, and superior end products backed by data-driven architectures and designs aimed at converting and keeping users. Here are some sites I've developed.