Answer the question
In order to leave comments, you need to log in
.htaccess - subfolder as root?
Good afternoon.
I have a subdomain at the root of the site itself, site.ru/subdomain
I set up a redirect so that when subdomain.site.ru is accessed, it takes the content from the site.ru/subdomain folder
RewriteCond %{HTTP_HOST} ^subdomain\.site.ru$ [NC]
RewriteCond %{REQUEST_URI} !^/subdomain/.* [NC]
RewriteRule (.*) /subdomain/$1 [L]
Answer the question
In order to leave comments, you need to log in
1. link to the site - but in this case the main site will have the same structure.
2. Throw a proxy if you have nginx + apache in this case, just point the root document to this folder, you can also use a proxy in Apache https://httpd.apache.org/docs/2.4/mod/mod_proxy.html
3. You can to do it through the CNC, you did not specify which engine.
4. and the simplest, if you have access to the apache vhost, then just change the root document in the config to the appropriate folder.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question