我想在Google Cloud Storage中托管一个网站,该网站的根指向某个文件夹(基本上它重定向到该/en/
文件夹,即默认语言)。
我可以使用x-amz-website-redirect-location
标头在Amazon S3中完成此操作。但是根据文档,该标头在Google Cloud Storage中不可用。
有没有一种干净的方法可以做到这一点?还是应该在根目录中使用meta refresh元素添加index.html文件?
正如@jterrace所评论的那样,现在无法使用标头进行重定向。解决方案是包括一个meta刷新元素:
<html>
<head>
<meta http-equiv="refresh" content="0; url=/en/">
</head>
</html>
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句