PDA

View Full Version : Anyone know mod_rewrite?


kau
01-23-2008, 02:37 AM
I would like to use mod_rewrite, if possible, on a subdomain, to point to the member.php script according not to their userid but username.

So let's say the username attached to the userid of 1 is John.

I want;

subdomain.domain.com/John

I know I could do something like subdomain.domain.com/1John

So the script knows the userid but how would I do it with just passing the username?

Dismounted
01-23-2008, 02:56 AM
Rewrite the URL to:
member.php?username=John

kau
01-23-2008, 03:26 AM
Hacking member.php to run off username instead of id looks complicated. Are you aware of a hack someone has done to do this already?

Kirk Y
01-23-2008, 03:55 AM
It's default functionality; you can use ?u= or ?username=.