Apache Web Forwaring

Discussion in 'Server Operation' started by mattbrown, May 16, 2006.

  1. mattbrown

    mattbrown New Member

    Hi
    Ive been trying to find out about redirecting urls with apache but getting a bit confused

    basically i have www.mydomain.com which points to the ip of my web server per normal, now some other people want to use sub omains ie something.mydomain.com etc etc so i make a new A record for something.mydomain.com which points to my apache server.

    Now when somebody goes to this address i want apache to redirect them somewhere else just like somebody like 123reg would (framed). at present i overcome this by adding a virtual server for the domain then adding a php file to the virtual servers document root and getting it to send a new header but this is surely not the best way to go about this and in turn also changes the url in the users browser
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Do you want the subdomains to point to the same web space as the main domain?
     

Share This Page