`
happyqing
  • 浏览: 3163201 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

IIS7 SSI 相对路径

    博客分类:
  • iis7
阅读更多

 

 

 

<!--#include virtual="/scripts/myfile.txt"-->

<!--#include file="myfile.txt"-->

virtual是基于"虚拟目录"的,在nginx上写../的相对路径都是好的(需修改点nginx源码),但在iis不行

file是基于(当前)文件的,可以写绝对路径,也可以写相对路径../,在iis下可以。

 

http://blogs.msdn.com/b/robert_mcmurray/archive/2010/12/28/iis-notes-on-server-side-includes-ssi-syntax-kb-203064-revisited.aspx#MIFVS

 

More Information on File and Virtual Syntax

SSI directives that use file paths can reference files by using a file or virtual path.

  • The file element is used with files that are relative to the folder of the current document. The following example includes a file in the current folder:
    <!--#include file="myfile.txt"-->
  • The virtual element represents paths that are relative to the base folder of the Web server. The following example includes a file in the /scripts virtual folder:
    <!--#include virtual="/scripts/myfile.txt"-->
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics