How to do Domain wildcard mapping www.mywebsite.com/{slug} to {slug}.mywebsite.com
Unanswered
Cuvier’s Dwarf Caiman posted this in #help-forum
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
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
@Cuvier’s Dwarf Caiman 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
you can check this inside your middleware. Take a look at this example middleware:
https://github.com/vercel/platforms/blob/main/middleware.ts
https://github.com/vercel/platforms/blob/main/middleware.ts
@Cuvier’s Dwarf Caiman solved?