0

I plan to implement a feature on my website where users can point their domain to sub domain provided by my service.

Sub Domain provided to John by my service is john.myservice.com

John bought this domain www.john.com and wants to map it to john.myservice.com

I know this can be done with Virtual Hosts if I am using Apache server but what am I interested to know is if is there an easy way to achieve this without me writing PHP stuff to update vhosts file every time user register with my service?

4

1 回答 1

1

You could use wildcard/dynamic subdomains so you would just have one virtual host entry and it would work with any subdomain. Take a look at http://joshduck.com/blog/2010/07/13/dynamically-define-subdomains-with-apache/ to see how to set it up.

于 2012-08-03T21:12:10.963 回答