|
Posted by joelbyrd on 03/02/06 01:27
I have a people-networking type site in which each user has their own
profile page, with their user id encoded. So, for example, the web
address of their page might look like
"www.example.com/my_profile.php?user_id=fdjkhfh2489298hf298h3s0dhfxj".
I want the users to be able to choose their own web address that would
look like "www.example.com/Joel", and then when they type in that
address, they are automatically redirected to their profile page with
the more complex address.
I believe mod_rewrite is the solution to this?
Reading a little bit about mod_rewrite, I believe the rule I want is
something like the following:
RewriteRule ^/(.*) /redirect_user.php?user_name=$1
So 2 simple questions:
1) does this rule look like what I want?
2) how do I install and hook up the module, and do I write this rule
in the .htaccess file?
I'm brand new to mod_rewrite, so any help would be appreciated.
Navigation:
[Reply to this message]
|