首页 > 解决方案 > GoogleCloudStorage 重定向到另一个域

问题描述

提前感谢您的回答我想让谷歌云存储链接(storage.googleapis.com)重定向到我自己的域到目前为止我已经实现了这一点,但是当我添加一些类似图片的东西时,它托管在我的一个服务器中链接到这个域的谷歌云存储链接不能正常工作,解释:

例如我的域名example.com,如果我在此之后添加任何内容,例如https://storage.googleapis.com /example-test/example.html#gOAdv.png它只重定向到主域example.com

这是我的内容example.html

<meta http-equiv="refresh"content="0; url=http://myexampledomain.com/">

请注意,当我从链接 ( https://storage.googleapis.com/example-test/example.html#gOAdv.png ) 中删除 # 时,它会显示此错误:

此 XML 文件似乎没有任何与之关联的样式信息。文档树如下所示。

<Error>
    <Code>NoSuchKey</Code>
    <Message>The specified key does not exist.</Message>
    <Details>No such object: example-test/example.html/gOAdv.png</Details>
</Error>

标签: google-cloud-storage

解决方案


大家好,我找到了答案,这是我的想法

<meta http-equiv="refresh"content="0; url=http://myexampledomain.com/">

这条线很短而且很糟糕,我需要通过另一种语言对其进行编码才能使其工作。谢谢大家。


推荐阅读