【问题标题】:The given path is misformatted or contained invalid characters: Apache Error给定路径格式错误或包含无效字符:Apache 错误
【发布时间】:2016-01-29 04:27:41
【问题描述】:

我在 windows 环境下使用 apache2.2。我必须 ssi 包含以下内容:

<!--#include virtual="/content/app/en/jcr:content/test.html" -->

它在下面给出一个错误:

[Fri Jan 29 14:53:09 2016] [error] [client 127.0.0.1] (20024)The given path is misformatted or contained invalid characters: Cannot map GET /content/app/en/myPage.html HTTP/1.1 to file
[Fri Jan 29 14:53:09 2016] [error] [client 127.0.0.1] unable to include "/content/app/en/jcr:content/test.html" in parsed file 

我尝试过使用 /:,但没有效果。在浏览器上它给出错误:[an error occurred while processing this directive]

【问题讨论】:

  • 有人知道这个错误吗?

标签: regex apache ssi


【解决方案1】:

Windows 不允许在其文件夹名称中使用:,因此 apache 无法将其映射到磁盘上的文件。这不应该发生在 linux 上。

如果可能,请在上述路径中使用_jcr_content 而不是jcr:content

【讨论】:

  • 我建议将 ":" 用反引号括起来以获得更好的可读性:: :)
猜你喜欢
  • 1970-01-01
  • 2015-03-29
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2023-01-04
  • 2021-05-27
  • 2017-06-26
相关资源
最近更新 更多