Use RewriteCond %{QUERY_STRING} without attaching the query string to the new address
snippet in htaccess

Use RewriteCond %{QUERY_STRING} without attaching the query string to the new address

user701

RewriteCond %{QUERY_STRING} view=products&id=12345 
RewriteRule .*$ /8831? [L,R=301]