简体   繁体   English

如何删除.html 扩展至谷歌云存储桶中的 static 网站

[英]How to remove .html extension to static website in google cloud bucket

Is there any way to remove the.htlm extension from a static website located in a google cloud storage bucket?有没有办法从位于谷歌云存储桶中的 static 网站中删除 .htlm 扩展名? I tried using .htaccess but it didn't work.我尝试使用 .htaccess 但它没有用。

It is not possible, but you can use App engine or Firebase hosting to serve an static HTML website and hide HTML extension.这是不可能的,但您可以使用App 引擎Firebase 托管服务于 static HTML 网站并隐藏HTML扩展名。

For the App Engine approach you can manually add URLs on the app.yaml for example对于 App Engine 方法,您可以在 app.yaml 上手动添加 URL

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM