Forum Moderators: buckworks & webwork

Message Too Old, No Replies

Virtaul Sub-Domains

How do I get a sub domain to map to another web page?

         

donjohnson

12:01 am on Aug 12, 2003 (gmt 0)



I have a domain ... let's call it domain.com

Is there an easy way of making this so that if someone keys in www.sub1.domain.com that the subdomain will work by displaying a file at,say, www.domain.com/sub1

simlarly,

www.sub2.domain.com would 'secretly' map to www.domain.com/sub2.html

www.sub3.domain.com would go to www.domain.com/sub3.html

etc

etc

Thank you.

moltar

12:02 am on Aug 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't know if this is easy enough for you, but you can do it following way:

- Enable wildcard for the domain pointing
- Use mod_rewrite and create rules for mapping

globay

12:09 am on Aug 12, 2003 (gmt 0)

10+ Year Member



If your are using virtual hosting, you probably have to set up each subdomain separately. Just ask you hoster.