javascript - 如何在浏览器中加载指向文件夹的静态html

标签 javascript html css angularjs directory

我的文件夹结构,

public---|
         |-index.html
         |-static-|
                  |-static.html

当我以 localhost:4000 运行元素时,它指向公共(public)文件夹并加载 index.html,但现在我想加载 staic.html 我输入 localhost:4000/static 但仍然加载了 index.html,任何人都可以帮助我。提前致谢。

最佳答案

Apache 的解决方法

更改您的 Apache 配置。

将此配置元素添加到您的 VHost 中:

<Directory /static/>
    DirectoryIndex static.html
</Directory>

关于javascript - 如何在浏览器中加载指向文件夹的静态html,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44239597/

相关文章:

javascript - 从服务器端解析 json 对象

Javascript 字符串反转每个单词

javascript - EmberJs 添加函数的返回字符串作为类名

html - 使用 wkhtmltopdf 时字体不采用相同的字体系列名称

javascript - 动态创建的 iframe 内容为空

html - CSS Fluid 图像问题...垂直对齐和图像不是从 div 的顶部开始

html - 在图像( map )上自定义绝对定位的 FontAwesome 标记

javascript - 价格变化时更新 strip 数据量

html - 如何让链接在导航栏中以图像为中心而不是在顶部?

jquery - 在不调整图像大小的情况下将图像包含在较小的父 div 中