【发布时间】:2022-02-09 13:45:31
【问题描述】:
我想使用 Azure blob 文件存储来托管静态网站。
如果 html 页面位于 $web-storage 的根文件夹中,这可以正常工作。
但是,如果我将网页放入子文件夹,则相关链接(例如指向 css 文件)不再起作用 - 因为它们被解释为基于根的链接
<link href="css/bootstrap.css" rel="stylesheet">
index.html 位于“subfolder1”
但不是
https://blablabla.web.core.windows.net/subfolder1/css
解决了
https://blablabla.web.core.windows.net/css
这是 Azure 的错误还是我的 html 中的误解/错误?
【问题讨论】:
-
index.html 是你的根文档吗?
-
index.html 位于 /subfolder1/ ...如果我将它直接放在根目录 "/" 下,一切正常,从那时起 /css 存在......但都放在 /subfolder1/index 下。 html 和 subfolder1/css 失败
-
我想我要问的问题是你是如何访问 index.html 的?是
https://blablabla.web.core.windows.net还是https://blablabla.web.core.windows.net/subfolder1/index.html?
标签: html azure static azure-storage