Answer the question
In order to leave comments, you need to log in
How to make a 301 redirect while keeping subdomains?
How to make a 301 redirect from podomen.site.ru to podomen.site.com the domain can be anything
Answer the question
In order to leave comments, you need to log in
RewriteEngine on
RewriteCond %{HTTP_HOST} ^podomen\.site\.ru [NC]
RewriteRule ^(.*)$ http://podomen.site.com/$1 [R=301,L]
For nginx:
server {
listen 80;
server_name ~^(?<subdomainname>[a-z0-9\-]+)\.domain\.ru;
return 301 http://$subdomain.domain.com;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question