This question has been asked a lot, and I still haven’t figured it out.
My app has the same requirements as Carrd.co.
Users create a site to share, and they create a subdomain as the link.
User creates “Cool Site”, and give it subdomain: cool-site.myawesome.app
Currently, I have a domain in Netlify bought through Netlify. Which I think supports wildcard subdomains.
I would like to know how to do this, and then how to do redirects based on this.
from = “https://*.myawesome.app”
to = “https://myawesome.app/user-site/:splat”
status = 200
The app is a SPA app, and user sites will be rendered from a path called user-site.
So ideally the redirect can mask that path, and it looks like its just cool-site.myawesome.app but its actually running: myawesome.app/user-site/cool-site
How do I do this?