【发布时间】:2017-02-13 18:34:28
【问题描述】:
我想问一个最愚蠢的问题,但我现在搜索了一段时间,无法弄清楚。
我的 Apache DocumentRoot 下有以下文件结构:
DocRoot
- page1
- ...
- webapp
- index.html
- somescript.js
index.html 的 script 标签看起来像
<script src="somescript.js" type="text/javascript">
如何配置 Apache 以服务 https://myhostname.com/webapp 以便正确加载脚本?第 1 页应在 https://myhostname/page1 下保持可访问性。
当前的行为是找不到somescript.js,因为请求是https://myhostname.com/somescript.js。
我确实不想为此设置一个虚拟主机或编辑 html 文件(生成的)。
【问题讨论】:
标签: javascript html apache webserver