Hello, I'm having a problem with my S3 RoutingRules on an S3 static website.
I've got an S3 bucket dev.example.com set as static website hosting. I have a Cloudfront distribution using the bucket as an origin, via the s3-website URL (not the REST URL from the dropdown selection). My domain name is registered in R53 and pointed to the CloudFront distribution URL.
All of that is working very nicely.
However, I've been trying to add a 301 redirect from one bucket object to another - I moved a page on my website.
So I've got my S3 bucket RoutingRules as follows:
When I visit dev.example.com/old-url, the redirect takes place, but takes me to dev.example.com.s3-website.eu-west-2.amazonaws.com/new-url - not to my domain name.
Is it possible to tell S3 to redirect to the correct domain name?
I have tried adding the full URL to the new page, i.e.
- but this doesn't work, I just get the S3 URL with my full URL on the end!
Suggestions gratefully received.