4

I have a problem with redirects in cloudfront.


  • I configure Cloudflare two NS in my webpanel first.

I follow this steps after this:

https://stackoverflow.com/a/42869783/3332734

enter image description here

  • In cloudfront I pointed my two buckets.
  • In my two buckets, I set hosting website and redirect with bestdestiny.panel.adm.br with https prefix

See my buckets config below:

enter image description here

enter image description here

and each bucket has the respective policy rule:

enter image description here

And this is my cloudfront config below:

enter image description here

enter image description here

but...

enter image description here

Cœur
  • 37,241
  • 25
  • 195
  • 267
Francis Rodrigues
  • 1,470
  • 4
  • 25
  • 61
  • 6
    The reason for the problem seems obvious enough -- you have configured CloudFront to send requests to a bucket and you have configured the bucket to redirect requests to the same CloudFront distribution that is sending the requests to the bucket. It's a redirect loop. What you do not seem to have mentioned is why you created two buckets or why they are in two different regions, but the question you cited is for creating two sites, one with `www` and one without. You're not doing that here, so it doesn't seem like you should be configuring that redirect in S3. – Michael - sqlbot Dec 12 '17 at 20:00
  • 1
    Solved! I followed these recommendations to fix it with custom error pages: https://serverfault.com/a/815741/102749 – Francis Rodrigues Oct 19 '18 at 01:05

0 Answers0