Generating user profile pages

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Mutton
Forum Newbie
Posts: 2
Joined: Sun Oct 12, 2008 7:03 pm

Generating user profile pages

Post by Mutton »

Hi everyone,

I have a website that has authenticated users. I would like each user to have their own profile page, however I do NOT want the address of each profile to be like this: http://www.website.com/profile.php?user=mutton

My goal would be to have each user's profile address like so: http://www.website.com/mutton

Is there an elegant way to do this? Or at least an elegant way to redirect the nice looking address to the ugly looking one? :D

Any help would be much appreciated! Thanks,
Andrew
PietM
Forum Newbie
Posts: 8
Joined: Mon Oct 06, 2008 2:56 am

Re: Generating user profile pages

Post by PietM »

You should look into mod-rewrite in Apache.
Mutton
Forum Newbie
Posts: 2
Joined: Sun Oct 12, 2008 7:03 pm

Re: Generating user profile pages

Post by Mutton »

Aha! That totally answers my question. Thank you so much!

For anyone else interested, I found a decent article on URL rewriting using Apache's mod_rewrite:
http://www.yourhtmlsource.com/sitemanag ... iting.html
Post Reply