Redirect an old link to new site homepage [closed]

Query arguments are in %{QUERY_STRING}, so you have to look there:

RewriteCond %{QUERY_STRING} ^p=\d+
RewriteRule ^ http://www.example.com/newblog/ [L,R=301]

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)