I have a website that has an query string in the url that I want to rewrite. The url is domain.com/profile.php?user=sven and I want it to redirect to domain.c
domain.com/profile.php?user=sven
domain.c
Probaly all the problem here:
RewriteRule ^profile.php$ domain.com/user/%1?/ [L,R=301]
This may fix your problem.