Unique url for users?

what do I need to learn to work on creating a unique url for users upon registration?

such as

www.mysite.com/username/ or www.mysite.com/main.php?user=username

I just need to know what to search for to learn this, as my search terms aren’t coming up with much.

it is very simple search, just type mod_rewrite into search box.
this very forum is stuffed with examples.
note that it is server config thing, not PHP

“human readable urls” is also good query for google

thanks a lot, now I know what to search for.

a question re: mod_rewrite though…, if I understand correctly it only changes urls? ie, I would already have to have the users custom page in place before even using mod rewrite. if so, I’m not even sure how to do this.

basically my practice site has a database full of movies, when a user registers I want them to have their own personal page.

then I want them to be able to select a list of movies from the database, and the selected movies will display on that users personal page, sorted into sections by genre.

I have a login and registration system working, but that’s it. am I correct in assuming I need to code the user page before I use mod_rewrite to change it’s url?

You might have user.php, and access it like http://site.com/user.php?u=johnny
With mod_rewrite, you can let them access http://site.com/johnny and this will be changed internally into http://site.com/user.php?u=johnny so your user.php script can run.

Hope that makes sense, you obviously need a script to do what you want with user pages, the rewrite just gives a prettier way to access the script.

that’s what I thought, thanks for the clear explanation.

I’m just not sure what I need to learn next to actually get the user page script set up in the first place, sorta learning as I go here using my practice site as lessons :blush:

Do a search for “affiliate system tutorial”, i.e. any search phrase with “affiliate” in it.

That should get you some more information on how to set everything up.

I understand correctly it only changes urls?

quite contrary
it has nothing to do with urls on the pages, so you have to change the urls in your site manually, if any.

am I correct in assuming I need to code the user page before I use mod_rewrite to change it’s url?

by any means.
human readable urls is just a decoration. it have nothing to do with application logic. your scripts remain the same. so, it’s time to start writing it

yeah that’s what I thought… thanks guys, searching affiliate system stuff to try figure out my next step.