I have the following in my htaccess

```
RewriteEngine on
RewriteCond %{QUERY_STRING} (^|&)id=3($|&)
RewriteRule ^user/members/profile\.php$ /user/members/profile/id/3?&%{QUERY_STRING}

RewriteCond %{THE_REQUEST} /([^.]+)\.php [NC]
RewriteRule ^ /%1 [NC,L,R]
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^ %{REQUEST_URI}.php [NC,L]

```

I want the rewrite rules to do two things:

* Remove .php
* change user/members/profile.php?id=3 to user/members/profile/id/3

the query string is being redirected to user/members/profile/id/id=3?id=3

Help!