Call: (209) 560-6611

How to point your domain to a subdirectory.

Date: December 3, 2014 Author: ang Category: Tutorials Websites WordPress Comments: 0

For example let's pretend you have a website setup in the root directory (mywebsite.com) of your hosting account and you want to create a new website in a subdirectory (mywebsite.com/2014).

You can easily point the domain to the website setup in the subdirectory by editing the '.htaccess' in the root directory. Modify the '.htaccess' file by adding these lines at the end of the code.

RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www.)?mywebsite.com$
RewriteRule ^(/)?$ 2014[L]

The red portion of the code needs to be changed to match your domain and sub directory. This method also works for WordPress installations.

Leave a Reply

Your email address will not be published. Required fields are marked *

Before you post, please prove you are sentient.

What is 8 multiplied by 3?

Before you post, please prove you are sentient.

what is 9 plus 4?