如何在不指向扩展名为 html 的文件的情况下访问 google 存储桶上的 html 文件

How to access html file on google storage bucket without pointing to file with html extension

我想让网站用户在请求 www.website.com/userProfile(没有 .html)时加载 userProfile.html。 文档中没有相关内容。

您可以提供 HTML 没有 .html 后缀的内容。不过设置 content-type 很重要。例如,使用 gsutil:

gsutil -h "Content-Type:text/html" cp /path/users/userProfile \
    gs://www.website.com/userProfile