I'd like to setup react router for use with subdomains. I'm unsure where the logic for subdomain proxying should lie.
I want:
roxy.coolestblog.com/profile
to route to coolestblog.com/roxy/profile
mohammed.coolestblog.com/profile
to route to coolestblog.com/mohammed/profile
benben.coolestblog.com/profile
to route to coolestblog.com/benben/profile
another use case:
en.coolestblog.com/some-article
to route to coolestblog.com/en/some-article
fr.coolestblog.com/un-article
to route to coolestblog.com/fr/un-article
es.coolestblog.com/una-article
to route to coolestblog.com/es/una-article
I already have it working without the subdomain.
How can I achieve this so it works both on client and server?