My htaccess rule is :
RewriteCond %{QUERY_STRING} ^param1=val1
RewriteRule ^index\.php$ /page1 [L,R=301]
This redirects to the url : http://myhost/page1?param1=val1
If my url is : http://myhost/index.php?param1=val1¶m2=val2
should redirects to : http://myhost/page1?param2=val2
That means, it should not include the matched query string in RewriteCond