aws-amplify / amplify-hosting

AWS Amplify Hosting provides a Git-based workflow for deploying and hosting fullstack serverless web applications.
https://aws.amazon.com/amplify/hosting/
Apache License 2.0
460 stars 116 forks source link

Localization support for Angular apps on Amplify Hosting #3016

Open otaku0304 opened 2 years ago

otaku0304 commented 2 years ago

Added new application in AWS Amplify and the deployment is successful but the thing is HTTP ERROR 404. After adding localize: true in angular.json file it is getting HTTP ERROR. I'm using AWS Amplify services.

screenshot of HTTP ERROE

keenplify commented 2 years ago

Same issue for me, using Next 11. Previous deployments are successful but now are 404

Additional Info Server is in me-south-1, Middle East

ghost commented 2 years ago

Hi @otaku0304 👋🏽 can you confirm that your baseDirectory is set to the appropriate file path? We are unable to detect an index.html file in your build artifacts which may be causing the 404 issue.

Hi @keenplify 👋🏽 please provide your app ID so we can also investigate your 404 issues. Thank you!

ghost commented 2 years ago

@otaku0304 your baseDirectory was set correctly actually but after further investigation I confirmed with the team that Amplify Hosting doesn't support localization with Angular at this time. I will keep this issue open as a feature request.

@keenplify since you are using the Next.js framework please open a new issue using the Bug report template so we can assist you.

otaku0304 commented 2 years ago

Thanks for u reply @hloriana. It is weird for me to here this news. May I know when this problem is going to be solved.

GavynHolt commented 1 year ago

Any updates on this? I am trying to deploy with localize: true with no success.

cgaege commented 1 year ago

Same here. Are there any updates on this?

otaku0304 commented 1 year ago

Any updates on this? I am trying to deploy with localize: true with no success.

can you try with firebase for me it is working fine.

immorello commented 1 year ago

Any news about this topic? In my case I tried to change the baseDirectory to src/ but the only result I have got is a blank page. Is Amplify still not supporting "localize:true"?

hisham commented 1 year ago

+1. Localization is needed for any big website...

nternouski commented 5 months ago

I resolve the issue In the seccion Amplify > Hosting > Rewrites and redirects. And modify the inputs like this:


Source address: from /<*> to /en/<*> ("en" or whatever lang) Target address: /index.html to /en/index.html ("en" or whatever lang) Type: Not modify


Source address: from </^[^.]+$|\.(?!(css|gif|ico|jpg|js|png|txt|svg|woff|ttf|map|json)$)([^.]+$)/> to /en</^[^.]+$|\.(?!(css|gif|ico|jpg|js|png|txt|svg|woff|ttf|map|json)$)([^.]+$)/> ("en" or whatever lang) Target address: /index.html to /en/index.html ("en" or whatever lang) Type: Not modify


I did for each language and works.