Best way to move site from subdomain to root through cPanel?
- by Mbbc
I have an old Wordpress blog hosted on a subdomain (sub.mysite.com) with hundreds of posts.
The root domain is actually empty and redirected to the subdomain.
Now I want to move the site from the subdomain to the root domain.
I found some .htaccess examples like this:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^sub.example.com$
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]
This redirection seems to work if I clone or move the subdomain site into the root domain but, Is there an easier way? I mean, just like when you redirect from www. to non-www. and you only have one site installation. The site would be kept installed on subdomain folder but it would be accessed from root domain, is it possible?