Profiles with Domains

Hi all, I have been asked to build a website where people purchase a package and create their own profile for their hobbies. Most will have their own domain so how would I go about linking the profile up to the domain? Ideally everything should be automated and the end user will have no technical understanding.

For those that do not have a domain the domain would be something like www.example.com/users/jonny

Any thoughts on this would be great appreciated.

I think your question is how to create a webpage in a single place, which can have lots of different addresses.

www. example.com/users/jonny
www. example.com/users/wendy

Well, 2 main tasks.

Take their name lets say “Bob O’Marley” and turn it into a url friendly “slug” bobomarley.
Make sure that is unique, or add something to it that makes it unique. bobomarley2
(search just this forum for the term slug or slugify to find examples and discussion on this)

Then…

read up on Apache’s mod_rewrite and make it so that all requests for www.example.com/users/jonny actually go to :

www. example.com/users/index.php?name=jonny

Then index.php queries your database and presents jonnys’ details, but the users address bar will still show your lovely unique url.
(you can search several SP forums for more info on mod_rewrite, including this one)

Hi Cups,

Good to hear from you. Your answer is close to what I was asking, but I didn’t explain clearly enough. People can have their own profile domain such as www.example.com/users/jonny OR they can point their own domain such as www.jonny.com. Not sure how this could be handled??

You give them a field in your form and your database called url.

If it is empty you display their real url.

Hi Cups, so when a user points their domain to my server, how do I then make sure that their domain goes to their profile page? This is what I seem to be stuck on…?

Anyone got any ideas?

Sounds as if you are asking, if their own domain name is mynameiswendy.com then it should divert to your own website.

I cannot see how this can happen without this user having access to their own MX records for their domain name.

Hi Cups, oh damn, that’s a real problem…hmm will need to keep looking into this one! Thank you for the pointers anyhow :slight_smile: