www redirect in amplify console infinitely redirects

0

I think I found a bug with AWS Amplify. When I deployed a starter gatsby application and then add a route53 url, I can get the www domain working where it redirects to the root domain. If I go to the root domain directly, however, it redirects infinitely to the www version.

So www.mydomain.com will redirect to mydomain.com and the page loads fine.

Directly going to domain.com will redirect to domain.com/www.domain.com/www.domain.com... and that will repeat forever in the web address.

In the custom domain section I do have a redirect in the root to the www so perhaps that is it, but it is strange that it appends the domain to the url instead of just redirecting.

질문됨 5년 전1501회 조회
3개 답변
0

I had the same problem.
I believe the default values written in the tab "Rewrites and redirects" are not correct.

If you look at the line for the 302 redirect, you will see:

  • source address: https://your_domain.com
  • target address: www.your_domain.com

You need to change the target address to: https://www.your_domain.com

Hope it solves your problem!

Not sure how to report it as a bug to the amplify team.

Edited by: boris13 on Apr 28, 2019 9:16 AM

boris13
답변함 5년 전
0

Hi stephen and boris,

You're right, this is an issue on our end that we are working to fix! In the meantime, the above answer is correct. Add "https://" to the front of the custom domain target in the app rewrites and redirects page.

Please let me know if this still doesn't working for you.

Thanks,
Dan

AWS
답변함 5년 전
0

That totally worked, thanks so much Boris & Dan!

답변함 5년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠