Forum Moderators: phranque

Message Too Old, No Replies

Domains On subdomains

let's say it's a blog

         

mehdvirus

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

10+ Year Member



ok, I'm giving the users these urls on my site:
user1.domain.com
user3.domain.com
...

now i want user to be able to set their own Domains on these subdomains
like :
user1.com - > user1.domain.com
user3.com - > user3.domain.com

do you know what i mean ?

basically i want do something similiar to what blogger does !

I'm using php , so how can I do this ?
it would be awesome if you also could give me an example !

jdMorgan

3:34 pm on Sep 23, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Have these users point the DNS for their domains to the IP address of your server, and then handle their hostname requests in much the same way as you do the subdomain requests.

Don't confuse domains and subdomains in URL-space with filepaths inside the server; You don't point a subdomain to a domain, you point it to a host -- a server, an IP address. The server in turn maps the requests into its filespace -- to your script file, for example.

How you need to do this depends on how your server is set up, and your questions are too unfocused to get good answers at this point. But generally, you'll need a server with a unique (non-shared) IP address to do this, and then you'll need to map requests for all domains and subdomains to a script which can handle the various types of hostname requests: subdomain requests, user-domain requests, and "main site" domain requests, all of which should be checked for canonical form and redirected to canonical hostnames if non-canonical.

There are many previous threads on mapping user-subdomains and user-domains into the server filespace. A review of some of them may prove useful to your project. Try the WebmasterWorld Site Search facility -- the link is at the top left of almost every page here.

Jim

mehdvirus

4:19 pm on Sep 23, 2009 (gmt 0)

10+ Year Member



thx , I already did a search but I'll try searching with other keywords too!

I wish there was a script that I could study , not like wordpress though,it's too big :D