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.

Addon & Sub Domains

Discussion in 'General Discussion' started by nikez, Mar 23, 2004.

  1. nikez

    nikez Member

    Joined:
    Mar 23, 2004
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    Hi guys,

    I have only just started using cPanel and WHM....fantastic by the way!!

    I was wondering if someone could help me. I am currently setting up a new business and there are 4 seperate sections to the site. I want them to act as sub-sections if you like and therefore would like to create a subdomain for them.

    I have created the sub-domains that I want and have tried to setup a redirection thing. This works but not exactly how I wanted it to. When it redirects the whole URL in the address bar changes.

    What I want to know is, is there any way of redirecting a sun-domain to a folder on the main site, but it acts as if it was seperate.

    Example:

    "support.indigocs.com" is linked to "indigocs.com/support"

    I want to be able to navigate the site from a sub-domain...

    "support.indigocs.com/forums" is actually "indigocs.com/support/forums"

    I hope someone can help me with this - I have heard you can do it by using addon domains? I tried this and managed to mess up my server completely :eek: - Luckily it was a fresh install so it was ok :)

    Thanks a lot!

    James
     
  2. bamasbest

    bamasbest Well-Known Member

    Joined:
    Jan 10, 2004
    Messages:
    531
    Likes Received:
    0
    Trophy Points:
    16
    See what happens if you treat it as a subdomain as opposed to an addon domain.
     
  3. nikez

    nikez Member

    Joined:
    Mar 23, 2004
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    How do you mean bamasbest?

    I simply did the redirect thing for the subdomains. It allowed me to type in:

    support.indigocs.com/forums

    for example, but it wouldnt keep that in the address bar. Instead it showed the redirected folder (indigocs.com/support/dorums). I just want the sub-domain to remain in the address bar rather than showing the redirected folder.

    Any ideas?
     
  4. bamasbest

    bamasbest Well-Known Member

    Joined:
    Jan 10, 2004
    Messages:
    531
    Likes Received:
    0
    Trophy Points:
    16
    I think I understand now .....

    You may want to just create a new account for support.indigocs.com, then modify httpd.conf so that support.indigocs.com and www.indicos.com serve up from the same directory.
     
  5. elleryjh

    elleryjh Well-Known Member

    Joined:
    Apr 12, 2003
    Messages:
    479
    Likes Received:
    0
    Trophy Points:
    16
    If you want to forward, just create the subdomain in cPanel and then use "setup redirection" on the subdomain page.

    If you want to keep the subdomain in the address bar, don't setup redirecting.
     
  6. nikez

    nikez Member

    Joined:
    Mar 23, 2004
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    I dont know if I am happy modifying configuration files lol....last time i didnt that i couldnt log onto my FTP ;)

    Isn't there an easier way of doing it?

    I did that but it simply replaces the address with the redirection directory...like i mentioned above.

    Take this example....

    The Google Answers URL is http://answers.google.com

    When on that site it takes you into a directory called answers and displays it in the address bar as http://answers.google.com/answers/.

    Thats what I want to do with my sub-domains. I have a forums section in a support folder. The URL is http://support.indigocs.com.

    When the user goes to the forums website I want the address to display http://support.indigocs.com/forums/.

    Currently the address bar displays http://www.indigocs.com/support/forums. <<<< Not Good :)

    Get me now? :)
     
  7. Juanra

    Juanra Well-Known Member

    Joined:
    Sep 22, 2001
    Messages:
    777
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Spain
    James, what you want to get is actually the default behaviour of subdomains in cpanel, just setup the subdomains and forget about redirections, addon domains, etc. Each subdomain will behave as a separate domain (you can still get their contents as a subdirectory of the parent domain, but that's just the way it is, not they way it has to be).

    Check you .htaccess files, they might be causing problems if you have already set any redirections.
     
  8. nikez

    nikez Member

    Joined:
    Mar 23, 2004
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    So basicallly what you are saying is that I can create the sub-domains and they will automatically redirect to that folder without having to set anything up?
     
  9. Juanra

    Juanra Well-Known Member

    Joined:
    Sep 22, 2001
    Messages:
    777
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Spain
    Correct. In fact, CPanel creates the folder if it doesn't exist.
     
  10. nikez

    nikez Member

    Joined:
    Mar 23, 2004
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    hahahah...fantastic!!

    Thank you SO much :) - Y didnt I see the folder it created :eek:

    Thanks for the support guys :)
     
Loading...

Share This Page