Url rewrite of deep paths in spa

Hello, I have a preact SPA. My rewrite configuration works for paths such as:
.com/page1
.com/page2
I use /tr right after .com for localization. So my Turkish pages should be rendered in:
.com/tr/sayfa1
.com/tr/sayfa2
but when I go to “.com/tr/sayfa1” it tries to fetch index.js under /tr/ path instead of root. So it is giving me 404.

In rewrite configuration it is like below. Is there a specific redirection logic for deep paths?

This fails for example: Digital Peax

Hi there,

Our docs have some guidance regarding rewrites: https://docs.render.com/redirects-rewrites

If the tips regarding rule syntax and wildcards don’t help, just let us know and we will be happy to take a closer look.

Regards,
Mike


Render Support Engineer, MT (UTC-6, UTC-7 in Winter)

Hello, I checked the document and tried various things but couldn’t figure it out. I’d really appreciate if you could take a look.

Hi there,

In order for us to look more closely at your service, please reach out to us privately via the Help link in the Dashboard. Be sure to specify the service in question here.

Regards,
Mike


Render Support Engineer, MT (UTC-6, UTC-7 in Winter)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.