I am trying to create user-friendly URLs for my users profiles. For example, elena93, is a user. And to go to her profile, you can simply go to: http://mysite.com/elena93
I know how to achieve this using htaccess:
RewriteEngine on
RewriteRule ^([^//]+)$ user.php?id=$1 [QSA,L]
The above code works, but the problem is, I have rewritten urls for other pages too. Like, home.php can be accessed using http://mysite.com/home
, messages.php can be accessed using http://mysite.com/messages
. When I set up the user-friendly profile links, rewritten urls for home, messages, etc pages stops working.
How do I fix that? Thank you!