List Info

Thread: seeking mod_rewrite solution




seeking mod_rewrite solution
user name
2006-03-02 03:04:14
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=fdjkhfh2489298
hf298h3s0dhfxj".
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 probably the best solution for
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 where do I
include
the rule, just right in the .htacess file?

I'm brand new to mod_rewrite, so any help would be
appreciated.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Apache Chat" group.
To post to this group, send email to Apache-Chatgooglegroups.com
To unsubscribe from this group, send email to
Apache-Chat-unsubscribegooglegroups.com
For more options, visit this group at http://gro
ups.google.com/group/Apache-Chat
-~----------~----~----~----~------~----~------~--~---

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )