routing based on subdomain

Hi, I want to show a specific component when there is any subdomain *.example.com and in that component I need to get the subdomain name and when there is no subdomain render different component is that possible?
2 Replies
Madaxen86
Madaxen866mo ago
You can use useLocation() and check the host or use window.location if you use only client side rendering https://docs.solidjs.com/solid-router/reference/primitives/use-location
andahendriksen
andahendriksen4mo ago
Did you find a solution? I want to show user profiles on username.domain.com instead of domain.com/username
Want results from more Discord servers?
Add your server