Answer the question
In order to leave comments, you need to log in
How to make a 301 redirect from a subdomain to a website page?
There is a test.site.com domain, you need to make a 301 redirect to site.com/test
Option
RewriteCond %{HTTP_HOST} ^test.site.com$ [NC]
RewriteRule ^(.*)$ site.com/test$1 [R=301 ,L]
Doesn't work.
Similar. like
RewriteCond %{HTTP_HOST} ^category\.example\.com [OR]
RewriteCond %{HTTP_HOST} ^category\.example\.com
RewriteRule ^(.*)$ example.com/category/$1 [L,R= 301]
What other options are there?
Joomla main site, html subdomains
Answer the question
In order to leave comments, you need to log in
RewriteCond %{HTTP_HOST} ^(.*)\.site\.com$ [NC]
RewriteRule ^(.*)$ site.com/%1 [R=301,L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question