Link to home
Start Free TrialLog in
Avatar of dprundle
dprundle

asked on

named and httpd.conf forward a subdomain to another directory on the server

I have the domain warcraftmmo.com and i'd like to forward gmail.warcraftmmo.com to another directory (http://www.warcraftmmo.com/gmail/).

This is my httpd.conf:


<VirtualHost 216.40.235.171>
ServerAdmin webmaster@warcraftmmo.wvutalk.com
DocumentRoot /home/dprundle/public_html/warcraftmmo
BytesLog domlogs/warcraftmmo.wvutalk.com-bytes_log
ServerName warcraftmmo.com
ServerAlias www.warcraftmmo.com

User dprundle
Group dprundle
CustomLog /usr/local/apache/domlogs/warcraftmmo.wvutalk.com combined
ScriptAlias /cgi-bin/ /home/dprundle/public_html/warcraftmmo/cgi-bin/
</VirtualHost>

<VirtualHost 216.40.235.171>
ServerName gmail.warcraftmmo.com
DocumentRoot /home/dprundle/public_html/warcraftmmo/gmail
</VirtualHost>



This is my named:

mail IN CNAME warcraftmmo.com.
www IN CNAME warcraftmmo.com.
gmail 14400 IN A 216.40.235.171
www.gmail 14400 IN A 216.40.236.171




My problem is that gmail.warcraftmmo.com just forwards to www.warcraftmmo.com instead of www.warcraftmmo.com/gmail/

any help is appreciated.

Avatar of northcide
northcide

this has nothing to do with dns.  all you need to do is either create a .htaccess file with a redirect to newsite.com/whatever.html.

or just put an index file in the root of the old domains site directory and put a meta redirect for it to go to the new site...

this will outline your options in detail.
http://www.webweaver.nu/html-tips/web-redirection.shtml

ASKER CERTIFIED SOLUTION
Avatar of alextoft
alextoft
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ouch, yup i totally missed that.  you need to configure it for named based virutal hosts rather than ip based virtualhosts, or just give the box a new ip and make each of those virtualhosts unique ip's