Answer the question
In order to leave comments, you need to log in
How to swap domain and subdomain?
There is a site site.com and the second sub.site.com.
You need to swap them. Those. so that those who type "site.com" see "sub.site.com" and vice versa.
Is it enough to set up a redirect in htaccess? Is it possible to do so at all?
And, if not difficult, how to do it?
I'm afraid? if you do it like this:
RewriteRule ^sub.site.com/(.+)$ site.com/$1 [QSA,L]
RewriteRule ^site.com/(.+)$ sub.site.com/$1 [QSA,L]
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