替代Google云端存储中的“x-amz-website-redirect-location”

时间:2015-05-02 10:23:08

标签: google-cloud-storage

我想在Google云端存储中托管一个网站,其根目录指向某个文件夹(基本上它会重定向到/en/文件夹,即默认语言。)

我可以使用x-amz-website-redirect-location标头在Amazon S3中完成此操作。但根据the documentation,该标头在Google云端存储中不可用。

有干净的方法吗?或者我应该在根中添加一个带有meta refresh元素的index.html文件吗?

1 个答案:

答案 0 :(得分:0)

正如@jterrace所评论的那样,现在无法使用标题重定向。解决方案是包含元刷新元素:

<html>
    <head>
        <meta http-equiv="refresh" content="0; url=/en/">
    </head>
</html>