htaccess redirect dynamic posts

Use this before any mod_rewrite directives:

RedirectMatch Permanent ^/art/(\d+).html /?p=$1

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