Google cloud storage 如何访问google存储桶上的html文件而不指向具有html扩展名的文件

Google cloud storage 如何访问google存储桶上的html文件而不指向具有html扩展名的文件,google-cloud-storage,Google Cloud Storage,我想让网站用户在请求www.website.com/userProfile(不带.html)时加载userProfile.html。 文档中没有这方面的内容。您可以提供不带.HTML后缀的HTML内容。不过,设置内容类型很重要。例如,使用gsutil: gsutil -h "Content-Type:text/html" cp /path/users/userProfile \ gs://www.website.com/userProfile 我试图通过将一个.htaccess文件上传

我想让网站用户在请求www.website.com/userProfile(不带.html)时加载userProfile.html。
文档中没有这方面的内容。

您可以提供不带.HTML后缀的HTML内容。不过,设置内容类型很重要。例如,使用gsutil:

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

我试图通过将一个.htaccess文件上传到bucket存储中来实现这个结果,但没有成功。知道为什么吗?