PDA

View Full Version : mod_rewrite



Arithan
05-15-2009, 02:01 PM
I've seen a couple different threads about this, but none of them seemed to be the same as what I'm trying to do.

I have a site where everyone has their own profile page. The url format to get to those pages is something like http://www.example.com/profile.php?id=21 The number varies from user to user. How can I make it so that a user can give people a url with their username on it and it will go to the same page?

So if my profile url is http://www.example.com/profile.php?id=21 I want to be able to go to http://www.example.com/Arithan and have it go to the same page.

wysiwyg
05-16-2009, 08:00 PM
How does it know that Arithan is 21?

Arithan
05-17-2009, 11:17 PM
i got it to work by changing my profile.php to retrieve the username in the url instead of the id.