apache开启ssi
SSI stands for server Side Includes which is a simple interpreted server-side scripting language used for the Web.The biggest advantage of SSI is to include the contents of one or more files into a web page on an intenet server. Its common usage includes addition of common piece of code throughout a site, such as a page header, a page footer and a navigation menu. Conditional navigation menus can be conditionally included using control directives.
First you can check SSI are enabled on your server or not. So create one test.html file and add the following code . <!–#ECHO var=”DATE_LOCAL” –> Then access the page by using the UR http://domain.com/test.html and it shows the current date to the screen Wednesday, 23-Jun-2010 23:53:09 BST Means SSI was enabled on your server and If the URL shows the blank page then SSI are not enabled on your server. If you want to enable it then you need to add the following code into the.htaccess file. AddType text/html .htm .html .shtm .shtml .sht AddHandler server-parsed .htm .html .shtml .sht .shtm
首先,您可以检查是否在服务器上启用了SSI。 因此,创建一个test.html文件并添加以下代码。 <!–#ECHO var =“ DATE_LOCAL” –>然后使用UR http://domain.com/test.html访问页面,并在屏幕上显示当前日期2010年6月23日,星期三23:53 :09 BST表示您的服务器上已启用SSI,如果URL显示空白页,则说明您的服务器上未启用SSI。 如果要启用它,则需要将以下代码添加到.htaccess文件中。 AddType文本/ html .htm .html .shtm .shtml .sht AddHandler服务器解析的.htm .html .shtml .sht .shtm
Save and exit
保存并退出
If you want to enable the SSI on the server then you need to add same code in httpd.conf file and restart the apache service.
如果要在服务器上启用SSI,则需要在httpd.conf文件中添加相同的代码,然后重新启动apache服务。
In order for a web server to recognize an SSI-enabled HTML file and therefore carry out these instructions, either the filename should end with a special extension, by default .shtml, .stm, .shtm, or, if the server is configured to allow this, set the execution bit of the file. It has a simple syntax <!–#directive parameter=value parameter=value –> that Windows and cPanel Web Hosting server both supports SSI to make task easy.
为了使Web服务器能够识别启用SSIHTML文件并执行这些说明,文件名应以特殊扩展名结尾,默认情况下为.shtml,.stm,.shtm,或者如果服务器配置为允许这样做,设置文件的执行位。 它具有简单的语法<!–#directive parameter = value parameter = value –>,Windows和cPanel Web Hosting服务器都支持SSI,以简化任务。
翻译自: https://www.eukhost.com/blog/webhosting/what-is-ssi-and-how-to-enable-it/
apache开启ssi
本文详细介绍了Apache服务器上的SSI(Server Side Includes)功能,包括其优势、常见用途及如何检查和启用SSI。SSI用于在网页中包含其他文件内容,如页眉、页脚和导航菜单,简化网站维护。文章提供了在.htaccess和httpd.conf文件中启用SSI的步骤。

768

被折叠的 条评论
为什么被折叠?



