Fix — View Shtml

Keywords: view shtml fix, shtml not parsing, enable ssi, apache includes, nginx ssi, server side includes fix

<!--#includefile="nav.html"--> (Missing space and virtual/file attribute)

# Enable SSI Options +Includes AddType text/html .shtml AddHandler server-parsed .shtml OPTIONAL: Also parse .html or .htm files as SSI AddHandler server-parsed .html AddHandler server-parsed .htm view shtml fix

<!--#include virtual="/includes/header.html" -->

Add the following lines:

Options +Includes turns on Server Side Includes. AddHandler server-parsed .shtml tells Apache to scan .shtml files for <!--#include --> tags before sending them to the browser. Fix #5: Enable SSI in Nginx (Power Users) If you are running an Nginx server and .shtml files show as raw code, you must add SSI filters to your server block.

The path must exist exactly as a URL would. If you type yoursite.com/includes/header.html in a browser and get a 404, your SSI will also fail. Fix #8: The MIME Type Issue (Browser Downloads SHTML) If your browser tries to download the .shtml file instead of viewing it, the server is sending the wrong MIME type. Keywords: view shtml fix, shtml not parsing, enable

Add this to .htaccess : AddType text/html .shtml