- Newest
- Most votes
- Most comments
Hello,
In your amplify app where you specify the 200 rewrite rule and in which you have the domain "https://foo.mydomain.com/" setup, can you please try adding the source as just the path i.e., "/tools/site1" and then target as "https://bar.mydomain.com" just to check if that works.
Also, I see that setting up Rewrites across different Amplify apps is not supported with Amplify Hosting as of now. The team is aware of the same and has taken it in as feature request on the below GitHub issue.
[+] https://github.com/aws-amplify/amplify-hosting/issues/2601
I'd like to mention that currently you can setup a redirect instead of rewrite but that would be a change in path. You can subscribe to the above mentioned GitHub issue for the future updates on the same.
Having said that, if you are trying to setup a reverse proxy rewrite, kindly note that Amplify can only do a reverse proxy rewrite for only publicly-accessible webpages.
How do you set up redirects for Amplify?
https://docs.aws.amazon.com/amplify/latest/userguide/redirects.html
Relevant content
- asked 2 years ago
- asked a year ago
- asked 2 months ago
- I tried to delete my ACM certificate but received an error that it's in use with other AWS resourcesAWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a month ago
- AWS OFFICIALUpdated 2 years ago
Thanks Srinath.
I also tried adding the source as just the path i.e., "/tools/site1" and then target as "https://bar.mydomain.com", but I get the same 502 CloudFront exception.
I think it's regarding the issue you've mentioned, Rewrites across different Amplify apps is not yet supported. We'll wait for the feature and then move our applications to Amplify.
Hello
I am facing a similar issue in my amplify hosted frontend website to rewrite from path based route to a CNAME record which points to custom website hosted by another provider.
I needed the below setup.
test.domain.com/blog to rewrite to blog.domain.com which is CNAME record in my account pointing to a custom DNS provider URL. My website is in Amplify and configured with 200 rewrite rule but getting DNS errors. However the 301 redirect rule works but that is not my requirement.