Is it possible to send a 301 redirect for bucket objects?

January 9, 2019 442 views
Ubuntu 18.04 Block Storage

I’ve tried to redirect bucket objects by adding the x-amz-website-redirect-location: to objects but that does not appear to be working. Has anyone come up with other solutions?

2 Answers

What endpoint are you testing via?

x-amz-website-redirect-location is only for use in static-sites endpoint.

edited by jarland

This is the bucket I’m using if that helps:

https://noventech.nyc3.digitaloceanspaces.com/

I’m trying to enable a bucket website to see if that would help. Can I upload the configuration file or do I need to use the API and use a PUT as shown here:

https://developers.digitalocean.com/documentation/spaces/#create-bucket-website

Have another answer? Share your knowledge.