Then use an SSI directive to echo parsed content:
This replaces the SSI directive with a visible marker, allowing you to verify if includes are being resolved. Even with the methods above, you may not get "extra quality" results. Here are the top three failure modes:
But a common frustration arises: How do you ensure that when you "view shtml extra quality," you are seeing the resolved, fully rendered output rather than the raw, unparsed code? view shtml extra quality
Options +Includes XBitHack on AddType text/html .shtml AddHandler server-parsed .shtml SSILogLevel debug SSILog ssi_log
location ~ \.shtml$ ssi on; ssi_types text/html; subs_filter '<!--#include virtual="(.*)" ?>' 'INCLUDED: $1' ir; Then use an SSI directive to echo parsed
<!--#config errmsg="[Error: Include Failed]" --> <pre> <!--#include virtual="/debug/ssi_status.html" --> </pre> Nginx doesn’t parse SHTML natively like Apache. Instead, use ngx_http_subs_filter_module to view interpolated variables:
This article dives deep into what SHTML is, why "extra quality" matters for debugging and SEO, and the exact methods to view parsed SHTML files with perfect fidelity. SHTML is an extension for HTML files that contain SSI (Server Side Includes) directives. Unlike a standard .html file (which the server sends as-is) or a .php file (which requires a full scripting engine), an .shtml file is processed by the web server (Apache, Nginx, IIS) to execute simple commands before sending the final HTML to the browser. Options +Includes XBitHack on AddType text/html
In the Network tab, right-click on the request → "Copy" → "Copy Response" to paste the fully rendered output into a diff tool (e.g., Beyond Compare, VS Code Diff) to compare production vs. staging SHTML outputs. Method 3: Server-Side Debugging Modules (For Admins) If you are a server administrator, you can configure your web server to output both the raw SHTML and the parsed version side-by-side. This is the ultimate "extra quality" inspection. Apache Configuration ( httpd.conf or .htaccess ) Enable extended SSI debugging: