I'm using .htaccess to re-write some of my URLs for my web application. The following is used to make the
RewriteRule ^user/([0-9a-zA-Z-]+) /user?url=$1 [NC,QSA]
Redirect to the correct URL by prepending a rule
RewriteRule ^(.*)/$ /$1 [L,R=301]
/? to your regexp.