Allowing users to use their domain name to their profile?

Posted by cappuccino on Server Fault See other posts from Server Fault or by cappuccino
Published on 2010-08-07T12:09:16Z Indexed on 2010/12/28 9:55 UTC
Read the original article Hit count: 228

Filed under:
|
|
|
|

I have a web site / app where each user as a profile i.e.:
mydomain.com/user1
mydomain.com/user2
mydomain.com/user3
etc

How do I allow it so that a user can use their own domain name to go to their profile as a rewrite not a redirect. So when they go to lets say:
user1theirdomain.com they see there profile at mydomain.com/user1, but I don't want a redirect, I want it so their domain is seen in the address bar.

I imagine the user will need to adjust there domain name DNS to point to my server, what are the correct procedures and what would I need to do from there?

Also I wouldn't want to manually adjust things, I'd like it so when they point their domain to my server, my app will check the domain name, lookup the domain in my database and then serve the correct content.

Any ideas?

© Server Fault or respective owner

Related posts about php

Related posts about .htaccess