Custom domain UI functionality routes not working #354
-
Hello. I'm working with two CNAMEs: But when I try to access normal routes, such as /login, /recovery, /verification at (https://login.newtesc.com/login, https://login.newtesc.com/recovery, https://login.newtesc.com/verification) the return I get is page not found. But when I try to access using Ory's CNAME, such as https://auth.newtesc.com/ui/login or https://auth.newtesc.com/ui/recovery, the correct pages appear, including the modifications I made and uploaded to the deployment at https://login.newtesc.com. Can anyone help me with this? I'm confused. I've tried putting https://login.newtesc.com as the Custom UI Base URL in the ory console, but to no avail. But I may have skipped a step. Here are some images of my project configuration that might help you understand this: Pictures of my Ory console. Images of the two CNAMEs trying to access the same routes. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @pedrodgoes This is a netlify problem and not an Ory problem. You need to add rewrite rules inside your netlify config. Since this application is a SPA it is served from a singular index.html file. When routing to another path on netlify it tries to serve a file under that path, e.g. /recovery -> recovery/index.html which isn't possible. Rewrites allows any URL to be redirect to the index.html / -> /index.html |
Beta Was this translation helpful? Give feedback.
Hi @pedrodgoes
This is a netlify problem and not an Ory problem. You need to add rewrite rules inside your netlify config.
https://docs.netlify.com/configure-builds/javascript-spas/#build-configuration-for-javascript-spas
Since this application is a SPA it is served from a singular index.html file. When routing to another path on netlify it tries to serve a file under that path, e.g. /recovery -> recovery/index.html which isn't possible. Rewrites allows any URL to be redirect to the index.html / -> /index.html