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.

Make Subdirectory Appear as Root

Discussion in 'General Discussion' started by pbc, Mar 16, 2010.

  1. pbc

    pbc Member

    Joined:
    Sep 25, 2009
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Hi, hope someone can help (have searched but have a feeling I'm not using the right terminology to get the answer).

    Say my site is currently structured like this:
    http://www.examplesite.com/store/

    I want to be able to hide or redirect the 'store' directory so that the store appears when the user navigates to:
    http://www.examplesite.com/

    i.e. - have all the files from 'http://www.examplesite.com/store/' appear under 'http://www.examplesite.com/' without actually moving them there. Don't want the 'store' directory to be seen at all.


    My reasoning is that I want to be able to swap the 'store' directory in & out when there's a need to do maintenance to the site from time to time and, in doing so, shut off access to the public. I still want it to be fully functional in a password protected subdirectory (in this case, that would be 'store') so that I can do upgrades, debug or whatever.

    The idea being that the real root would contain a more professional looking page stating the site was down for maintenance (as opposed to the username/password box that pops up with cPanel's Password Protect Directory functionality).


    It would be great if someone would explain the steps using the example URLs above.

    Or, if there's a better way of going about this, it would be great to hear as well.


    Many thanks in advance!
     
  2. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    It would make much more sense logically to just move everything from public_html/store to /public_html and regarding your "swap" question, I would create a separate development site on it's own account or make that the one that is under /store or whatever.
     
  3. pbc

    pbc Member

    Joined:
    Sep 25, 2009
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Thanks Spiral. Decided to move to the root instead with the intention of having a dev version on my local machine to develop with.
     
Loading...

Share This Page