ndzlogo-1-1
Loading ...

INDIA – HEADQUARTERS

INDIA

UNITED STATES

CANADA

Suppose you have a WordPress site that changes periodically, like it’s changing every year and you want to install each year’s version of the site to a sub-folder (such as /2014, /2015, /2016 etc). Also, you need to have the original domain (mydomain.com) automatically redirect to a particular sub-folder (usually the latest).

Yes, you have a way to do this. Please follow these steps:

1) Install WordPress in a sub-folder, say /2016.

2) In your original document root, create a .htaccess file with the following contents:

.htaccess file

Here, change “mydomain.com” to your original domain name and “forum” to the sub-directory.

3) Save the .htaccess file.

Thus, those who access your domain will be redirected to the sub-folder specified in your .htaccess file. Now, if you want to redirect them to a new subdirectory, you just have to update the .htaccess redirect code. That’s all.

Author : Tuttu Jolly