Answer the question
In order to leave comments, you need to log in
How to redirect from a subdomain to a link (.htaccess)?
Good time of the day
Such a question:
You need to do a redirect using .htaccess
, for example, there is a site example.com (on the hosting there is only 1 folder with the name of the site, there are no others)
The user makes a request help.example.com, but in fact that he would get to example.com/page.php?tag=help
and it is not known in advance which subdomain the user will knock on.
Thanks in advance!
Answer the question
In order to leave comments, you need to log in
RewriteCond %{HTTP_HOST} ^help\.example\.com$
RewriteRule ^.*$ http://example.com/page.php\?tag=help [L,R=301]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question