301 Redirect domain Sub-folders to Subdomain subfolder
If both the main domain and subdomain point to the same directory on the filesystem, then you need to check the requested host using a mod_rewrite condition. So, for example, the following directives should go before the WordPress front-controller (ie. before the # BEGIN WordPress section): RewriteCond %{HTTP_HOST} ^(example\.com) [NC] RewriteRule ^(music/end/)$ http://music.%1/$1 [R=301,L] The … Read more