When a site in a subfolder is moved to a subdomain,
.htaccess rules need to updated to redirect URLs. This can be done by adding the following lines to the
.htaccess file in the root folder:
This will redirect all calls to
* indicates all the subpages under the subfolder.
Couple of points to note for this to work:
.htaccessrewrite rules work by the line order in the file. So these rules need to be above other rules for it to work.
- On WordPress sites, place these lines above the WordPress redirect rules, i.e., above the
# BEGIN WordPressline.
.htaccessfiles in the subfolder need to be removed.