I wish to create redirect object.
It is redirect to JSON file. HTML expires header will not work for me.
touch google
s3cmd --add-header='Location: http://www.google.com/' -P put google s3://bucket/google
It does not work as I do not set HTTP sttaus to 302
I prefer s3cmd
as it is already installed on target server but python might ok as well if s3cmd
can't do that.
You should set x-amz-website-redirect-location header when putting object and access it via region specific website endpoint to archive this. See the document here: http://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With