Amazon S3 object redirect

后端 未结 6 490
[愿得一人]
[愿得一人] 2020-12-24 05:10

Is it possible to put a redirect header on a s3-object? Like a 301 redirect.

For example:

mybucket.amazon-aws.com/myobject --> example.com/test
         


        
6条回答
  •  南方客
    南方客 (楼主)
    2020-12-24 05:54

    Within the last month, this functionality has just been added.

    You can find the API documentation here:

    http://docs.amazonwebservices.com/AmazonS3/latest/dev/how-to-page-redirect.html

    When you PUT your object, you need to set the x-amz-website-redirect-location key against that object to the 301 redirect that you wish to use.

    You can also use the console.

    enter image description here

提交回复
热议问题