How to htaccess 301 redirect pages with a question mark in the url
snippet in htaccess

How to htaccess 301 redirect pages with a question mark in the url

user300

RewriteCond %{QUERY_STRING} ^attachment_id=[0-9]+
RewriteRule ^/?$ http://www.example.com/? [L,NC,R=301]