i'm working on a website, where i'd like to use mod_rewrite for rewriting URLs like
www.example.com/index.php?p=MYPAGE --> www.example.com/MYPAGE www.example.com/index.php?p=user?u=MYUSER --> www.example.com/user/MYUSER www.example.com/index.php?p=group?g=MYGROUP --> www.example.com/group/MYGROUP
I've added so far these rules.
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?p=$1
RewriteRule ^user/(.+)$ index.php?p=user&u=$1
but i'm facing a problem. if i visit www.example.com/single-page everything is fine. Then if i visit www.example.com/user/SMTHING, i'm not getting to what i want. I've tried using C and L flag, without any success.
Any ideas?
Thank you