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
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
Did you find a solution? I want to show user profiles on username.domain.com instead of domain.com/username