Open ssi:html, shtml page include Web file
Using an SSI (server Side include) HTML file extension, SSI (server Side include), commonly referred to as "server-side embedding" or "server-side containment", is a server-based Web authoring technology similar to ASP. The default extension is. stm,. shtm, and. shtml.
Environment: Apache2.2 (httpd.conf file) Configure HTML, shtml to include Web files
1, remove AddType text/html. shtml, Addoutputfilter includes. shtml Front Comment
# Filters allow your to process content before it's sent to the client.
#
# to parse. shtml files for Server-side includes (SSI):
# (You'll also need to add "includes" to the "options" directive.)
#
AddType text/html. shtml. html
Addoutputfilter includes. shtml. html
2. Find Options Indexes followsymlinks in the back plus includes
Note that SSI can indeed use the shell to execute commands, a feature that is extremely dangerous because it executes any commands contained in the EXEC tag. If the user is likely to modify the content of your Web page, then you must turn off this feature. You can add the IncludesNOEXEC parameter to the options directive to turn off the EXEC function while preserving SSI.
<directory "e:/website" > #修改E:/WebSite Site Directory
# Options FollowSymLinks
# allowoverride None
# Order Deny,allow
# Deny from all
Options FollowSymLinks includes includesnoexec
AllowOverride None
</Directory>
3, restart Apache, ok your HTML, shtml can load the page.
4. Include the page with the include command.
The include element can determine which files should be included by either the file attribute or the virtual property. The file property is a path relative to the current directory, i.e. it cannot be an absolute path (beginning with "/") or contains ". /"Path. The virtual property may be more useful, which is a URL relative to the provided document and can start with "/", but must be located on the same server as the supplied document.
<!--#include virtual= "/header.html"-
Turn on SSI configuration under Apache