我的网站设置为使用SSI,并且工作得很好。SSI包含虚拟相对路径不起作用
但是,当我尝试通过SSI包含文件时,它将无法工作,因为我使用相对路径。例如,下面的工作
<html>
<head>
<!--#include virtual="include/head.shtml" -->
</head>
</html>
但这并不(假设存在的文件)
<html>
<head>
<!--#include virtual="../include/head.shtml" -->
</head>
</html>
有我丢失的东西,或者是有办法,我可以得到有关的更多信息这个错误。
我得到这个错误。让我困惑的是....../assets/reference_editable_forms/js路径。该文件不存在。 [2015年12月29日13:28:14] [error] [client :: 1]无法在解析文件/ Applications/MAMP/htdocs/TO中包含文件“../../include/head.shtml” /assets/reference_editable_forms/current_employed.html [2015年12月29日13:28:14] [错误] [client :: 1]文件不存在:/ Applications/MAMP/htdocs/TO/assets/reference_editable_forms/js, referer:http:// localhost:9988/TO/assets/reference_editable_forms/current_employed.html?objectId = LAytov5IZr&applicant_email = myemail%40gmail.com ... –
“head.shtml”的完整路径是“/ Applications/MAMP/htdocs /TO/include/head.shtml“? – Valentin
是的。无论如何,在那台机器上。 –