Mapping a Domain to a Specific Folder
Solution If you wish to map a domain name to a specific folder, the following are instructions in how to achieve this.

Example: you want mydomain.com/blog/ folder can be accessed at news.mydomain.com

  1. Ensure that mydomain.com/blog/ and news.mydomain.com already exist.

  2. Log into your account through SSH.

  3. To create a map from the domain to the folder you will need to use symbolic links. To create a link, use the following command (command should be typed on one line):

    ln -s /usr/home/www/$username/websites/$domain.com/docs/$folder /usr/home/www/$username/websites/$mapped_domain/docs


    where
    $username - your hosting account username
    $domain.com - the domain you want to map from
    $folder - the folder you want to map
    $mapped_domain - the domain you want to map to

    Please note that you should remove the /docs folder for $mapped_domain before running a command, otherwise you will get a error message "File already exists".

    In the case of the example, that would be:

    ln -s /usr/home/www/$username/websites/mydomain.com/docs/blog /usr/home/www/$username/websites/news/docs


If you need further clarification, please contact our support team.


Article Details
Article ID: 178
Created On: 25 Jan 2008 11:25 PM

 Back
 Login [Lost Password] 
Email:
Password:
Remember Me:
 
 Search
 Article Options