(Question) Redirects and subdomains

Hi, i have a question, but i dont know if its related to grav or .htaccess or both. Since I dont really have experience in .htaccess, i thought maybe you can point me in the right direction. I googled, but with no luck.

The problem: My grav page has 3 main pages, to which i pointed my subdomains through my webserver. So for example “contact.domain.com” redirects to “www.domain.com/contact”. That works, but the adressbar shows “www.domain.com/contact”. I want it to stay “contact.domain.com”, even if i navigate naturally through the menu to the contact page.

Hope someone can help me, I have the feeling, i couldnt find something useful with google because i am missing a keyword for what i want to achieve.

Yup that’s .htaccess. You probably set up a redirect rather than a rewrite. Take a look here: https://stackoverflow.com/questions/10642426/htaccess-rewrite-subdomain-to-directory