【问题标题】:How to remove .html extension to static website in google cloud bucket如何在谷歌云存储桶中删除静态网站的 .html 扩展名
【发布时间】:2020-11-21 10:54:12
【问题描述】:

有没有办法从位于谷歌云存储桶中的静态网站中删除 .htlm 扩展名?我尝试使用 .htaccess 但它不起作用。

【问题讨论】:

  • .htaccess 文件的配置是特定于 Apache 的概念。谷歌云存储桶(据我所知)不使用 Apache(或其任何派生)提供文件。

标签: html .htaccess google-cloud-platform google-cloud-storage


【解决方案1】:

这是不可能的,但您可以使用 App engineFirebase hosting 来提供静态 HTML 网站并隐藏 HTML 扩展。

例如,对于 App Engine 方法,您可以在 app.yaml 中手动添加网址

 url: /contact
  static_files: www/contact.html
  upload: www/contact.html

【讨论】:

  • 我知道了,谢谢你的回答!
猜你喜欢
  • 1970-01-01
  • 2020-04-02
  • 2018-12-24
  • 2018-09-24
  • 2019-09-20
  • 2019-06-04
  • 2020-12-10
  • 2020-12-31
  • 2021-11-15
相关资源
最近更新 更多