Answer the question
In order to leave comments, you need to log in
How to make a subdomain using htaccess?
Hello, there is a domain of the form - valera.kolya.ru
How to make a subdomain - sasha.valera.kolya.ru using htachess? There will be many such subdomains, we need a universal version.
Thanks in advance for your replies
Answer the question
In order to leave comments, you need to log in
Поддомены делаются на DNS-сервере.
Добавьте А-запись:
*.valera. A XX.XX.XX.XX
Копайте в таком направлении:
RewriteEngine On
RewriteBase /
Options +FollowSymLinks
RewriteCond %{HTTP_HOST} ^new\.site\.ru$
RewriteCond %{REQUEST_URI} !/new/
RewriteRule ^(.*)$ /new/$1 [L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question