Answer the question
In order to leave comments, you need to log in
Redirect subdomain to subfolder how to do it with .htaccess only?
Good afternoon. Googled, I find a lot of topics, but I can’t choose the right one for myself.
http://www.site.ru/another/any path after/
where another is a subfolder, make it look like
another.site.ru using xtaccess.
found this,
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^test.loc
RewriteRule bbc/(.*)$ bbc.test.loc/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^bbs.test.loc$
RewriteCond %{REQUEST_URI} !^/bbs
RewriteRule ^(.*)$ /bbs/$1 [L,QSA]
and fixed names - 404 error
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