PDA

View Full Version : Subdomains & PHP ?


Guy G
04-02-2005, 05:30 AM
Anyone know of a way to create subdomains in PHP?

Or combine PHP with some other language to create subdomains...

Any help is appriciated.

Colin F
04-02-2005, 06:22 AM
I'd say that has something to do with how your server is set up...

pie
04-02-2005, 09:00 AM
I'd say that has something to do with how your server is set up...
Great opinion :p lol.

If your trying to do what i think your trying to do? Which is user.yourdomain.com or something else that dynamic you can use: mod_rewrite function and a little bit of editing on your zones is needed.

Otherwise use the control panel you have.

Dean C
04-02-2005, 11:30 AM
PHP can't do this, it's entirely server-side :) You need to use a combination of wildcard DNS and mod_rewrite to accomplish user-subdomains

Breaker
04-02-2005, 11:57 AM
it is possible... i just dont have the slightest clue how :P

pie
04-02-2005, 12:20 PM
PHP can't do this, it's entirely server-side :) You need to use a combination of wildcard DNS and mod_rewrite to accomplish user-subdomains
Fancy repeating me Dean?

Dean C
04-02-2005, 12:47 PM
You didn't mention wildcard DNS ;)

Guy G
04-02-2005, 06:10 PM
Wildcart DNS is when anything.mydomain.com will get me to the main page right?

Is that how lets say deviantart.com did it?

Dean C
04-02-2005, 06:15 PM
Yep that's how they did it, you'll need to contact your host about that as I don't believe you can control it through your control panel :)