Normally, I’d use NGINX to handle a redirect where the new url points to the location where the files are. Do I need to provide a domain to achieve a 301 redirect?
Essentially, my original path is this. I’ve added a file called netlify.toml:
# A redirect rule with all the supported properties
[[redirects]]
from = "/apps/*"
to = "https://apps.elastic-joliot-524d89.netlify.com/:splat"
status = 301
force = true
headers = {X-From = "Netlify"}
The redirect works but I expect to see the page. Is this correct? Do I need to add a custom domain before seeing the page? Not sure I can redirect to a sub domain of a sub domain (elastic-joliot-524d89)
I just took a look at Netlify App and you don’t have a netlify.toml or a _redirects file. Do you have the netlify.toml with the redirect in the root of your repo? Note that @fool’s point is also correct int hat the custom header only works for proxied requests.
Many thanks for the replies. I once had that .toml file in. I was lost so I removed it, added a custom domain and forget about the /apps and use /xero instead. It’d be immensely greatful to have the original plan to work: /apps/* to https://apps.mayneweb.com/:splat
“I’m texting from mobile”
I’ll try the suggestions later and report my findings. Thanks