Answer the question
In order to leave comments, you need to log in
Is it possible to set .htaccess (site.ru) to redirect to a specific folder on the server?
There is a domain.ru domain in DNS referring to site.ru.
For site.ru, the parent folder is /mnt/data/apache/vhost2/site.ru
For sub.site.ru, the parent folder is /mnt/data/apache/vhost2/site.ru/sub.site
Is it possible to register in .htaccess (site .ru) redirect to a specific folder on the server /mnt/data/apache/vhost2/site.ru/sub.site/folder and to see the new domain.ru domain in the address bar?
Or does this trick need to be done through vhost.conf ?
<VirtualHost domain.ru:80>
DocumentRoot "/mnt/data/apache/vhost2/site.ru/sub.site"
ServerName domain.ru
ServerPath "/mnt/data/apache/vhost2/site.ru/sub.site"
</VirtualHost>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question