Remapping a subdirectory (Remap Sub-Dir)

Remapping subdirectories can be useful when either re-structuring your site or giving access to other users to alter specific subdirectories without needing to give them full access to the site. By using this feature, users have subdirectories of their sites use non-standard locations within the file structure as a new source for web content.


  • You cannot use the remap subdirectory service to change the web directory for an entire domain. To change the entire web directory, you must edit the domain from the ‘Manage Domains’ page.
  • Only the username used to remap the subdirectory has access to that directory, and not the original owner. This means that while multiple users could each have folders assigned to them, they cannot share access to the same folder. This is illustrated in the following image:
1user 02.png
  • It’s not possible to remap directories across different servers.


CGI scripts won't work in subdirectories remapped to other user's home directories because of file ownership issues.


PHP scripts won't work in subdirectories remapped to other user's home directories because of PHP security limitations. Trying to run a script across users just loads a blank page with "No input file specified".

PHP scripts in remapped subdirectories (within your own home directory) can only run with the server's default PHP version.

How to remap a subdirectory

Confirming the two web directories to remap

In the following example, the subdirectory will be remapped to a different domain and directory named

Finding the web directory of the primary domain

To find the web directory:

  1. Navigate to the (Panel > ‘Domains’ > ‘Manage Domains’) page.
  2. Click the Edit button to the right of your domain.
    01 remap subdir.fw.png
  3. Under the ‘Users, Files, and Paths’ section, find the ‘Web directory:’ field. Use this directory path to your website.
    • This domain is and the user associated with the domain is dh_user
    • The ‘Web directory’ is /home/dh_user/ meaning that Internet traffic would go to that directory when attempting to reach the main site.
    • If someone navigates to, then according to the web directory set up already they would be directed to /home/dh_user/ for content.

By remapping subdirectories, visitors would not need to use that folder as the source for pictures. A user could give someone else access to their /pictures folder to update it without giving full FTP access

Finding the web directory of the domain to remap

Use the same directions above to find the web directory for the domain you’re going to use to remap.

02 remap subdir.fw.png
  • example_username is the user for the domain.
  • This means that the full path to the /newpics folder would be /home/example_username/

Remapping the subdirectory

Once you know the web directories for both domains, you can proceed with remapping the subdirectories.

  1. Navigate to (Panel > ‘Domains’ > ‘Remap-Sub-Dir’).
    03 remap subdir.fw.png
  2. Choose your domain from the dropdown list.
  3. In the field to the right, type in the directory you wish to remap.
  4. Click the Continue… button.
    04 remap subdir.fw.png
  5. Make the following selections:
    • URL to remap: This is automatically filled in by what was entered in the previous step
    • New path on [servername]: Choose your second username from the dropdown. Then type in the full path to the second domain to remap.
  6. Click the Remap this sub-directory! button to save. This may take up to 15 minutes to update on the server.

    In this example, is remapped to

    or in terms of file path:

    /home/dh_user/ now references /home/example_username/ for web content.

Viewing the final result

When logging in to the original directory via FTP, you see the following files:

05 remap subdir.fw.png

Note the two files:

  • Desert.jpg
  • Chrysanthemum.jpg

When logging in to the second remapped domain’s directory via FTP, you see the following files:

06 remap subdir.fw.png

Note the two files:

  • Lighthouse.jpg
  • Koala.jpg

However, if you now visit the original domain of through a web browser, only the files for the second remapped directory show:

07 remap subdir.fw.png

If this subdirectory was not remapped, the Desert.jpg and Chrysanthemum.jpg photos would be showing instead.

This means that although the original user still has access to the file structure, changes made in it no longer show online since this subdirectory no longer belongs to the original user. The second user for the remapped subdirectory controls this subfolder.

  • As you can see in the above screenshot, there is another folder named /test2 within the directory that ended up being remapped. At this point, the test2 directory and anything within it as well would not be accessible online as traffic is no longer going to that directory.
  • Further directories can only be added to the remapped subdirectory controlled by the second username.

See also