在IIS 7中配置SSI [英] Configuration of SSI in IIS 7

查看:138
本文介绍了在IIS 7中配置SSI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在我的计算机上安装了ServerSideIncludes模块,它有一个例外。

I've installed ServerSideIncludes module on my computer and it works great with one exception.

<!--#include virtual="meta.inc" -->

上述行导致了问题。我知道我必须用文件更改虚拟但我有一个庞大的网站,这意味着我必须更改至少1000行像这样的代码,我正在寻找一种方法在IIS 7中正确运​​行虚拟

The line above is causing the problem. I know I must change virtual with file but I have a huge website and it means I must change at least 1000 line of code like this and I am looking for a way to run virtual properly in IIS 7.

我是一直在寻找这个解决方案,但我已经找到了上面提到的解决方案。

I've been looking for this solution but all I've been able to find the solution I've mentioned above.

你知道如何解决这个问题而不改变虚拟文件

Do you know how to solve this problem without changing the virtual to file

谢谢。

推荐答案

您是否在您的网站上启用了父路径?在IIS中导航到站点的ASP部分,然后在行为部分中选择启用父路径,看看是否有帮助。

Do you have parent paths enabled over your site? Navigate to the "ASP" section of your site in IIS and select "Enable Parent Paths" in the "Behavior" section and see if that helps.

父路径选项允许您在调用MapPath等函数时使用..,允许使用.. \注释相对于当前目录的路径。将此属性设置为True可能会构成安全风险,因为包含路径可以访问应用程序根目录之外的关键或机密文件。

The Parent Paths option permits you to use ".." in calls to functions such as MapPath by allowing paths that are relative to the current directory using the ..\notation. Setting this property to True may constitute a security risk because an include path can access critical or confidential files outside the root directory of the application.

这篇关于在IIS 7中配置SSI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆