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 年前1500 查看次数
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 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则