views:

10

answers:

1

i tried to create this url rule buts not working: i dont know why :(

orginal url

www.example.com/viewprofile.php?username=jhon

the desired friendly url is

www.example.com/user/jhon

this is my.htaccess code:

RewriteEngine On
RewriteRule ^username/([^/]*)$ /viewprofile.php?username=$1 [L]

thanks for helping!! :))

A: 

I found this tutorial where the author explain step by step how to do exactly what you are trying to do. See if it helps: http://www.emanueleferonato.com/2008/06/15/how-to-generate-friendly-urls-with-htaccess-part-2/

relima