sHTML and ASP are similar, in shtml named files, using some of the SSI instructions, as in the ASP instructions, you can write SSI instructions in the shtml file, when the client access to these shtml files, the server side will read and interpret these shtml files, Explain the SSI instructions contained in the sHTML file.
Servers using shtml speed will be slower than HTML, faster than PHP. The feature of sHTML is that it can be included in the page, and it can partially update the page inclusion. Widely used can easily solve the problem of advertising in the Web page, do not need to update a comprehensive static page. Instead, just update one of the included pages. Here's a look at the Apache resolution shtml configuration (SSI) method:
Open http.conf file and search shtml
Remove the first two lines of the #, which is as follows
If you want to configure shtml for the entire server
Search again for options Indexes FollowSymLinks
Add includes to the inside as shown below:
OK Restart Apache
Then test, build two files, actually a call header.shtml and a index.shtml
The header.shtml code is as follows:
Included in two forms: if you want to know, please find the relevant documents
Then visit:
sHTML Configuration succeeded ... It's good, it's strong.
Next, if not the global configuration, but the site configuration. Can be as follows: The specific I have not tested, are derived from the network.
Jane, say it:
<!--#include file= "file name"-->
<!--#include virtual= "file name"-->
The file file name is a relative path that corresponds to the directory where the document using the #include directive resides. The included file can be in the same level of directory or its subdirectories, but not in the previous level directory. File= "nav_head.htm", such as the nav_head.htm document that represents the current directory. The
virtual file name is the full path to the dummy directory on the Web site. For example, the Nav_head.htm file that represents the Hoyi directory under the root directory of the server document; virtual= "/hoyi/nav_head.htm"
The above is the global configuration, if it is not written
Can be set in a single directory:
The configuration virtual directory can be set as follows:
namevirtualhost www.xing.com <virtualhost www.xing.com:80 > documentroot f:xing www.xing.com </VIRTUALHOST> <directory
Span class= "sh_string" > "f:xing" > Options Indexes followsymlinks AddType text/html. shtml addoutputfilter INCLUDES. shtml allowoverride None order Allow,deny allow to all </DIRECTORY>
This article source: http://my.oschina.net/miaoyaoyao/blog/65080