I have a vue SPA app hosted on netlify. I got it working using this redirect:
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
But now I want to make another redirect. If it receives a request from app.domain.com.br then it must redirect to domain.com.br/app/. To achieve that i tried to use this redirect:
[[redirects]]
from = "https://app.domain.com.br/*"
to = "https://prod.domain.com.br/app/:splat"
status = 301
I dont know how to use these two redirects together.
OBS: I want that if someone access by app.domain.com.br, it should no show domain.com.br/app but continue showing app.domain.com.br/whatever
Now my netlify.toml is this:
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
[[redirects]]
from = "https://app.domain.com.br/*"
to = "https://domain.com.br/app/:splat"
status = 301
[[redirects]]
from = "http://app.domain.com.br/*"
to = "https://domain.com.br/app/:splat"
status = 301