[NTLUG:Discuss] add a subdomain from web page

m m llliiilll at hotmail.com
Tue Nov 26 08:46:01 CST 2002


Hi All:
I want to add a subdomain from a web page to apache server, and the
after create the subdomain, it will redirect to another site. for
example:
add SUBDOMAIN on maindomain.com, redirect to test123.test.com, when I
type http://SUBMAIN.on maindomain.com, it bring me to
http://test123.test.com.
I am thinking that I have to do those steps:

1. Wildcard DNS entry for this domain in the DNS server.

change:
www IN A 123.123.123.123

to or replace with:
* IN A 123.123.123.123

2. open http.conf file add

<VirtualHost *:80>
   UseCanonicalName off
   VirtualDocumentRoot /www/%0
   VirtualScriptAlias /www/%0/cgi-bin
</VirtualHost>

3. create a web page, have 2 text fields asking for subdomain name and
redirect url.

4 create a subdirectory under /www/ with the subdomain name and create
a .access file with redirect url in it.

are these steps right?
step 1.2 is an one-time deal, step 3. can use html page to achieve it.
how do I do on step 4? use perl and cgi to make it?

any one have better idea or give some example to achieve it?

Thanks in advance.




_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail





More information about the Discuss mailing list