Task #19613
Bug UI: Internationalization page not found.
Added by Adarsh Shukla 11 months ago.
Updated 11 months ago.
Description
- i18n bug during deployement, when page is reloaded is redirects to page 404 not found.
- Status changed from New to In Progress
- % Done changed from 0 to 40
This issue occurs in the angular applications as it uses PathLocationStrategy
by default.
I found two ways to solve this issue: one from the client side (Angular) and another from the deployment server side (Nginx).
To solve this issue from client side(angular), we need to use HashLocationStrategy
instead of PathLocationStrategy which is by default, implementing HashLocationStrategy has some benefits in terms of deep linking, no need of extra configuration from server side but also some cons in term of SEO optimization and it adds '#' in the url segment.
To solve this issue from the server side, we need to write some rewrite rules
in the Nginx config file, which tell the server where to locate the index.html file based on the locales.
client side reference
server side configurantion reference1
Reference
Refernece under deployement section
I had a talk with Sachin regarding this issue, and based on his suggestion, I proceeded to use the client-side approach to solve it.
- % Done changed from 40 to 80
- % Done changed from 80 to 100
- Status changed from In Progress to Closed
Also available in: Atom
PDF