What i wanted to do is first hide all .php extensions in my URL secondly i wanted all users to have there pages with there usernames like www.domain.com/username
however i can easily do the first with this code in my .htaccess
.
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^([^/]+)$ $1.php
Now how can i do the second part as if somebody goes to this domain www.domain.com/username
server will route to www.domain.com/username.php
but it should go to URL like www.domain.com/profile.php?id=username
.
How can i achieve this?