« All posts

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" -->

Leave a Reply

Your email address will not be published. Required fields are marked *