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 subdir

Discussion in 'General Discussion' started by Diatone, Feb 7, 2002.

  1. Diatone

    Diatone Well-Known Member

    Joined:
    Aug 22, 2001
    Messages:
    111
    Likes Received:
    0
    Trophy Points:
    16
    Can someone tell me how to do the following? WITHOUT having to add the pointed domain as a new account on the server, then redirecting it through htaccess or other miscellaneous means..

    I want the domain name to point to a specific directory within
    the public_html folder. Not the main public_html folder itself..

    I want to know how to point a domain, lets call it, www.abc.com
    into an already existing account called www.diatone.net. But
    I want www.abc.com to not direct to www.diatone.net, but
    www.diatone.net/some/other/dir

    Thanks so much.
     
  2. AlaskanWolf

    AlaskanWolf Well-Known Member

    Joined:
    Aug 11, 2001
    Messages:
    537
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Fremont CA
    create a dns zone with default ip --- domain2.com

    add a virtual entry in the httpd.conf file to point the domain2.com to the subdirectory

    anyone that goes to domain2.com will then see domain2.com in their address bar and properties etc...
     
  3. Diatone

    Diatone Well-Known Member

    Joined:
    Aug 22, 2001
    Messages:
    111
    Likes Received:
    0
    Trophy Points:
    16
    Sorry to be stupid. But.. How. What do I need to write in my httpd.conf specifically? Also, in WHM, I alter the dns zone for the existing domain? Or create a new one? Thanks for the help..
     
  4. H2Hosting.com

    H2Hosting.com Well-Known Member

    Joined:
    Sep 4, 2001
    Messages:
    192
    Likes Received:
    0
    Trophy Points:
    16
    1) create subdomain via CPANEL
    2) Park new domain on top of subdomain
    3) If you want to have mail redirection for domain pinters:

    a) create file &domain.com& :)* main_user@maindomain.com) in /etc/valiases
    b) add new domain to /etc/localdomains
    c) add (new_domain.com :main_user_name) to /etc/userdomains
    d) send test mail to new domain
     
  5. bdraco

    bdraco Guest

    Is there a feature req open for this yet ?
     
  6. shaun

    shaun Well-Known Member

    Joined:
    Nov 9, 2001
    Messages:
    698
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    San Clemente, Ca
    Nick, Yep, i put in a request for Virtual Hosts the begging or last week cant remember.

    http://web.cpanel.net/bugzilla/show_bug.cgi?id=242
     
  7. Kylecool

    Kylecool Well-Known Member

    Joined:
    Aug 17, 2001
    Messages:
    68
    Likes Received:
    0
    Trophy Points:
    6
    Yea, good idea! ;)

    -Kyle
     
  8. Brian Farkas

    Brian Farkas Well-Known Member

    Joined:
    Aug 12, 2001
    Messages:
    81
    Likes Received:
    0
    Trophy Points:
    6
    I entered one for this also- well, added on to an existing one, anyway:

    http://web.cpanel.net/bugzilla/show_bug.cgi?id=47

    Hopefully this counts, since they are related :)
     
Loading...

Share This Page