I have url's like following with query string. I want to remove query string from url and want to make clean url.
www.demo.com/following.php?user=hardik
www.demo.com/fans.php?user=john
This url's should be like
www.demo.com/hardik/following
www.demo.com/john/fans
OR should be like
www.demo.com/following/hardik
www.demo.com/fans/john
Is this possible with htaccess? I tried to find a loot in google but still no luck. Need help.
Update:
I need something like this
www.demo.com/user/hardik/following/
www.demo.com/user/john/fans/
I tried like this
RewriteRule ^user/([^?]*) following.php?user=$2/ [L,QSA]