Next.js Discord

Discord Forum

How to do Domain wildcard mapping www.mywebsite.com/{slug} to {slug}.mywebsite.com

Unanswered
Cuvier’s Dwarf Caiman posted this in #help-forum
Open in Discord
Cuvier’s Dwarf CaimanOP
I've figured out how to make .com/{slug} always redirect to the subdomain but I don't want a redirect, just want the option to visit either the subdomain or the path

I'd like to create this mapping, but I also need to test this on a separate deployment before prod, and lastly the ability to conditionally enable/disable this mapping (say only whitelisted slugs or something)

Any help greatly appreciated

2 Replies