amplify-hosting
amplify-hosting copied to clipboard
200 Rewrite not working when the source is a subdomain with complete path
Before opening, please confirm:
- [X] I have checked to see if my question is addressed in the FAQ.
- [X] I have searched for duplicate or closed issues.
- [X] I have read the guide for submitting bug reports.
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
App Id
No response
Region
No response
Amplify Console feature
Redirects
Describe the bug
200 Rewrite is not working for the following rule.
[
{
"source": "https://dev.mydomain.ml",
"target": "https://anotherdomain.ml",
"status": "200",
"condition": null
}
]
On accessing "https://dev.mydomain.ml" , we do not see rewrite. It just renders the content present on the subdomain. However, 301 and 302 rules works fine.
Expected behavior
On accessing the domain https://dev.mydomain.ml, browser URL bar should show this domain but the content of https://anotherdomain.ml should be rendered.
Reproduction steps
- Create a sample application and associate the domain
- Use the above mentioned rule
Build Settings
No response
Additional information
No response
waiting for the resolution
Is this an SSR app? This is a known issue with SSR apps.
@oliver-leung Is this tracked in another issue anywhere? @myroslavmail did you figure out a workaround for this?
@daxiang28 no workaround, still an issue
@daxiang28 We are tracking this issue internally, but we don't have any new information at the time.
Hello @hloriana , thanks for the reply on #3305 . 301 is not a solution for me. I need rewrite, not redirect. The main goal is to be able to soft launch updates on our app to a limited set of countries, so we can monitor bugs and feedback before a global launch. And it must be as transparent as possible for the user, with no changes in url.
Well, my true wish is to be able to do some A/B tests, but I read here #331 that it's not possible atm. It would be awesome if in the future, we could do something like: on a given subdomain, 10% of users use branch newFeature, 90% of people stay on main. Maybe by using Cloudwatch Evidently under the hood ?
Well in the meatime, countries will do, and I'm looking forward for this to get fixed. Will follow this issue. Thank you !
Yep having same problem. Looking forward to a fix
Wondering how get this pushed up the priorty list a bit given its been a year. Having the URL write correctly I would have thought would be alot higher than it seems to be ATM. Just a thought. Being able to redirect correctly is paramount to web site working correctly. Might have to look at other options as this does not seem to be progressing since I queried a year ago.
@hloriii Any update on this issue ? It's been a while...
Subscribing to this issue. https://repost.aws/questions/QUeSBxa6s4T_GtkfFiTJNxzg/aws-amplify-rewrite-502#ANgGLAgiEoSpyg7_NFirCOWQ