The mod_alias Redirect directive does not look at the parameter string, so the Redirect statement will never match. Instead, you will need to use mod_rewrite. You can do something like the following:
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^suma\.ir$ [NC]
RewriteRule ^(.*)$ http://www.suma.ir/$1 [R=301,L]
RewriteCond %{QUERY_STRING} (^|&)id_product=12(&|$)
RewriteRule ^product\.php$ /$0?id_product=508 [R=301,L]
source
share