If you have PHP installed on your server, you can configure the auto_append and / or auto_prepend in the php.ini or .htaccess file. You can also configure .html extensions for analysis in Apache PHP files, so every HTTP request for a .html document is sent back with a header, and the footer is automatically included. If PHP is configured, try adding these lines to your .htaccess:
AddType application/x-httpd-php .html php_value auto_prepend_file /var/www/public/foo.html
source share