Make the apache/iis environment support shtml and shtml files

Source: Internet
Author: User

If you want apache to support shtml files and shtml files, we must enable the SSI service of apacahe. in iis, we also need to add an ssinc. dll. I will introduce it below.

What is the relationship between html or htm and shtml or shtm?

Html or htm is a static page format, that is to say, the server does not need to parse the script, or there is no script executed by the server, and because it is based on SSI technology, shtml or shtm, when there is a server-side executable script, it is viewed as a dynamic programming language, just like asp, jsp, or php. When shtml or shtm does not contain server-side executable scripts, the role of shtml is the same as that of html or htm.

Make apache support shtml and shtml files

Apache does not support SSI by default. We need to change httpd. conf for configuration. Take Apache 2.0.x on windows as an example. Open the httpd. conf file under the conf directory, search "AddType text/html. shtml", and find:

The Code is as follows: Copy code

# AddType text/html. shtml
# AddOutputFilter between des. shtml

Remove # from the front of the two rows.

Search "Options Indexes FollowSymLinks"

Add "des" after the row to be searched"

Change this row to Options Indexes FollowSymLinks Includes

It may be easier to get familiar with apache manual.

Save httpd. conf and restart apache.

Now we have completed the configuration of Apache SSI.

SSI configuration verified

Create a new ssitest.shtml file in the Server Directory
The file content is
<! -- # Echo var = "DATE_LOCAL" -->
The echo element is only the value of a variable. There are many standard variables, including all the environment variables that are valid for CGI programs. In addition, you can use the set element to define your dedicated variables.
The following content is displayed:
Tuesday, 26-Aug-2008 10:25:53 China Standard Time
Indicates that SSI is successfully configured. If no similar output exists, check whether the APACHE version or configuration is correct.


Make IIs support shtml and shtml files

1. Go to the iis website manager, switch to the "main directory" tab, and click "Configure ".

Then you will find an application ing with the extension. shtml, such:

If no, you need to click "add". The executable file address is "C: windowssystem32inetsrvssinc.dll.pdf (your cdisk is the system disk, the extension name is 2.16.shtml", and the action limit is "GET, POST", for example:

In this way, iis supports the suffix of shtml web pages.

Generally, after iis is installed, shtml is supported by default.

2. Set "include files on the server" in "web Service extension" to allow.

So far, iis can run the web page with the shtml suffix.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.