Redirecting a domain to a subdir

Diatone

Well-Known Member
Aug 22, 2001
109
0
316
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.
 

AlaskanWolf

Well-Known Member
Aug 11, 2001
535
0
316
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...
 

Diatone

Well-Known Member
Aug 22, 2001
109
0
316
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..
 

H2Hosting.com

Well-Known Member
Sep 4, 2001
192
0
316
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& :)* [email protected]) 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
 

Brian Farkas

Well-Known Member
Aug 12, 2001
80
0
306
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 :)