The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

can we make a new root directory in subfolder of main root directory?

Discussion in 'General Discussion' started by aricstechnology, Mar 18, 2013.

  1. aricstechnology

    aricstechnology Registered

    Joined:
    Mar 18, 2013
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    hi,

    i am the owner of website gamearics.com...now i want to make a new website for my friend (website name is bawawafers.com)..he approached me for domain name(which we already booked) and webspace .. ..but i already have a webspace which i am using for gamearics.com...i will do the following steps

    1.)make a new folder of name of bawawafer and place all his files there..so that we can see all files in gamearics.com/bawawafers

    2.)make an ftp server from cpanel for my friend to acess all his files in bawawafer folder.

    3.)create an addon domain from cpanel

    4.)give the dns address of my hosting server to domian name

    so now the problem is that i dont know that whether when he opens bawawafer.com ...will he be directed to gamearics.com/bawawafer..? and if yes then will the url will open of gamearics.com/bawawafers or bawawafer.com

    is it possible to have a root directory of bawawafers.com inside gamearics.com/bawawafer (folder name inside gamearics.com server)..so that if somebody types bawawafers.com in url box the index file will be opened from gamearics.com/bawawafers..and user or nobody knows that its inside gamearics server folder..

    thanks in advance
     
  2. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    You create the addon domain 1st, and set the root folder of it to public_html/bawawafer.
    That creates the directory public_html/bawawafer and you can upload the files there.
    It also creates a ftp account for that addon domain.
     
  3. arunsv84

    arunsv84 Well-Known Member

    Joined:
    Oct 20, 2008
    Messages:
    373
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    127.0.0.1
    cPanel Access Level:
    Root Administrator
    When he open bawawafers.com, he will be able to see the site directly. But if he try to access gamearics.com/bawawafers , it will open the same website without changing the url. Also there is a chance that search engines will index the url gamearics.com/bawawafers as well. You can avoid this by placing the following rules in .htaccess.

    Please note in my example:

    addondomain = Rootdomain name
    the-hosting-domain = The domain name that hosts your add-on domain.

    Here is what you need to put in you htaccess file in the directory that houses your add-on domain ie. www.the-hosting-domain.co.uk/add-on/

    And add this to the .htaccess file in the root domain: ie. www.thehostingdomain.co.uk

    That should work!

    Cheers!!!
     
Loading...

Share This Page