Forum Moderators: phranque

Message Too Old, No Replies

Dynamic Subdomain

Dynamic Subdomain

         

thephpguy

10:18 pm on Sep 14, 2005 (gmt 0)

10+ Year Member



I was wondering if there was a way to create a dynamic subdomain by modifing the httpd.conf file somehow the following is what I would like.

*.domain.com

documentroot = "/htdocs/*"

Thanks for any help

Cheers

Tim

jdMorgan

3:23 pm on Sep 15, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Tim,

Welcome to WebmasterWorld!

It might be easier to simply put all subdomains into subdirectories of one catch-all domain, and then use mod_rewrite testing the {HTTP_HOST} variable and checking for 'directory exists' to 'steer' each requested subdomain to its corresponding subdirectory.

Try a search of WebmasterWorld for "subdomain subdirectory HTTP_HOST rewriterule [google.com]' for more info.

Jim

thephpguy

1:15 am on Sep 16, 2005 (gmt 0)

10+ Year Member



Yo, Thanks thats just what I needed.