View Shtml Full (2025)
When a browser requests this file, the server scans it. It sees #include file="header.html" and replaces that line with the actual content of header.html. It sees #echo var="DATE_LOCAL" and replaces it with the current server time.
Sometimes, when you open an .shtml file directly in your browser (via file:// protocol or a misconfigured server), the browser does not recognize the SSI directives. Instead of seeing a full webpage, you see:
<!--#include virtual="header.html" -->
Main content here.
The browser treats the SSI as an HTML comment (which it technically is) and ignores it. You want to view the full rendered output after the server processes the includes.
Because the processing happens on the server, you cannot see the full result just by opening the file locally on your hard drive. Here is how to see the final output: view shtml full
A. Access via FTP/SFTP/SSH (Server Filesystem)
If you have server access, simply open the .shtml file in a text editor (nano, vim, Notepad++). You will see the raw directives.
B. Change the File Extension (Temporary Hack)
Rename page.shtml to page.txt or page.html (if your server is configured to parse only .shtml for SSI). Then request it via the browser. The server will not process the SSI and will display the raw code.
C. Use a Non-Parsing Request (Advanced)
Some servers allow you to request the source via specific handlers (e.g., ?source=1 if mod_rewrite is configured), but this is rare. The most reliable method is to use curl with a specific header to attempt to trick the server, though this rarely works since SSI is processed at a deeper level than HTTP headers. When a browser requests this file, the server scans it
D. WebDAV or Version Control (Git/SVN)
If the SHTML file is in a Git repository, use git show HEAD:path/to/page.shtml to view the raw source.
SHTML is largely obsolete, but many companies still maintain legacy intranets. If you are stuck with SHTML, here is how to modernize.
To see the true raw .shtml file with SSI directives intact, you need direct file access: The browser treats the SSI as an HTML
If the server is configured to parse SHTML, pressing Ctrl+U (View Source) will show you the rendered output—not the original SHTML. This is because the server sends only the final HTML to the client.
Workaround: Use a curl command to fetch the raw file from a misconfigured server:
curl http://example.com/page.shtml
If the server is set to treat .shtml as plain text, you will see raw directives. But on a correct server, this still shows rendered HTML.
