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.

redirecting a domain to a subfolder

Discussion in 'General Discussion' started by 1link4it, Mar 15, 2004.

  1. 1link4it

    1link4it Guest

    Help,

    How do I redirect a domain to a subfolder?

    i have only one domain and installed in a folder /mambo
    The CMS Mambo.

    How do I redirect this to my domain name ?


    Thanks
     
  2. BrightAdmin

    BrightAdmin Well-Known Member

    Joined:
    Feb 29, 2004
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    16
    Hi,

    Please include the following entry in the .htaccess file:

    redirect permanent domain.com/mambo/ yourdomain.com

    Regards,

    Bright:)
     
  3. 1link4it

    1link4it Guest


    Thanks. and where can i find that .htaccess file please ?
     
  4. BrightAdmin

    BrightAdmin Well-Known Member

    Joined:
    Feb 29, 2004
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    16
    Hi,


    You can find the .htacces file in the following path:

    /home/user/public_html/.htaccess

    Regards,

    Bright:)
     
  5. 1link4it

    1link4it Guest

    thank you :)
     
  6. 1link4it

    1link4it Guest

    oh dear, there is nothing :confused:

    Do you have an example >? is it called .htaccess and what should be the file rights rwxxx?

    Thank you
     
  7. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    If you don't have a .htaccess file, you can just create one.
     
  8. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    Also, have you tried the "Manage Redirects" in cpanel?
     
  9. 1link4it

    1link4it Guest

    Yes, but i had no result or i did that also wrong...i feel a bit hopeless now, and i don't know where it is wrong...

    The plan was to have 2 folders, one for the web site and one for the test web site....

    so i installed in /mambo the Web Site.

    Then went to manage redirect and tried several settings.

    like http://domain.com/mambo/ --> http://domain.com

    But if you know it, then yes please..i thought that the redirects where ment for these things :confused:
     
  10. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    Try this:

    In your redirect setup page in cpanel, put

    mambo/

    in the first box, and put

    domain.com

    in the second box, without http://.

    Should work.

    I just set a similar one up. Go to http://subdomainplaza.net/test/ to see what I mean. Just ignore the parked page you see. ;)
     
  11. 1link4it

    1link4it Guest


    Yes, that works fine...great thank you for all your help, i am trying it right now :)
     
  12. 1link4it

    1link4it Guest

    NO not working, the redirect is giving this info

    /mambo/ http://domain.com (permanent)


    i have exact as you told me...
     
    #12 1link4it, Mar 16, 2004
    Last edited by a moderator: Mar 16, 2004
  13. 1link4it

    1link4it Guest

     
    #13 1link4it, Mar 16, 2004
    Last edited by a moderator: Mar 16, 2004
  14. 1link4it

    1link4it Guest

     
    #14 1link4it, Mar 16, 2004
    Last edited by a moderator: Mar 16, 2004
  15. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
     
  16. 1link4it

    1link4it Guest

    Yes will contact them , i have so many more problems, maybe i will cancel my subsription, its problems all the time, the are playing around with their cPanel theme and i want the x2. but no fantastico in it, and it their cpanel is lots still working even when i have disabled it, but the bigest things is their name is overal in it and i can't change it, i want a clean cpanel for my customers.... and my WHM is very empty if i compare it with others:mad:

    Thanks anyway for your help...
    Really fine.

    Looks good your sites ;)
     
  17. 1link4it

    1link4it Guest

    When i place a .htaccess file in the folder, it is deleted automaticall, is this a setting from my hosting provider ?
    Is that also the explanation why the redirect is not working ?

    Thanks
     
    #17 1link4it, Mar 17, 2004
    Last edited by a moderator: Mar 17, 2004
  18. verdon

    verdon Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    836
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Northern Ontario, Canada
    cPanel Access Level:
    Root Administrator
    If you're placing via ftp, some ftp clients hide any files starting with a '.' by default. You might have to poke around in view menus or preferences if this is the case.
     
  19. 1link4it

    1link4it Guest

    Thanks it was indeed a hidden file...learning a load in this way, but its not working yet...this is my content of the .htaccess file...what should the file permissions be ? 644

    redirect permanent http://domain.com/mambo/ http://domain.com

    Not the www included.

    Thanks
     
Loading...

Share This Page