Amazon S3 object redirect

后端 未结 6 491
[愿得一人]
[愿得一人] 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:50

    Edit: See answer above as this functionality is now native in AWS

    Not really no. There isn't an inbuilt feature which allows this, however, what you can do is to create your object and even if you don't save it as HTML, you can apply it as an HTML file.

    For example:

    
    
    
        
        
        Redirect
    
    
    
        http://www.example.com/target/
    
    
    

    Look at this page here: View the source on it quickly.

    view-source:http://carltonbale.com.s3.amazonaws.com/distance_chart.png

    You can see an explanation here:

    Point 8: http://carltonbale.com/9-hidden-features-of-amazon-s3

提交回复
热议问题