Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

create a subdomain

Status
Not open for further replies.

peacecodotnet

Programmer
May 17, 2004
123
US
I would like to create a subdomain to a folder using PHP. The folder's name is "test" and I want the subdomain to be "test.mydomain.com".

How do I do this through PHP?

Peace out,
Peace Co.
 
TANSTAAFL
This is incorrect...
TINSTAAFL
This is correct...

There is no such thing as a free lunch.

;)

As for the question, this is a modification you will need to make at the apache/dns level.

Apache needs to know where the sub domain resides
DNS needs to know where to direct traffic.

Unless you run PHP as root on your machine and exec() stuff, which is a bad idea in itself that it doesnt warrent an explanation on how to do so. ;)
 
I have not! :( I only caught that because someone here in the office uses that regularly. ;)

great author though from what I have heard..
 
sleipnir214's sig has been discussed at length. :)

the "A" stands for "ain't" and, being a literary quote, is correct by definition.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top