There is a lot of information on the redirect, but I did not find a simple answer to this question.
1 answer
Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www\.subdomain\.site\.com [OR] RewriteCond %{HTTP_HOST} ^subdomain\.site\.com RewriteRule ^(.*)$ http://site.com/$1 [R=301,NC,L,QSA] - Alex I do not see a subdomain in the code (in this case, r.site.com). And if there is a need to redirect, say two subdomains? Unclear. - user224280
- Please write under our answer in the comments what exactly is not clear to you,
subdomainis the name of the subdomain, in your case it isr, i.e.www\.subdomain\.site\.comiswww\.r\.site\.com- Alex - Alex Everything works, thanks for the complete answer. - user224308
- @ Eugene are happy to help. However, remember that comments are intended to clarify the answer, not words of gratitude. To thank the author of the answer, vote for the answer or mark it as a decision . If the answer helped you, please do not forget to mark the answer as a solution (the jackdaw under the number arrow to the left of the answer) so that your question does not remain open. - Alex
|
subdomainis the name of the subdomain, in your case it isr- Alex