Two Rewrite Rules

Catch those requests before WordPress can see them:

RewriteEngine On
RewriteBase /

RewriteRule ^link/(\d+)$ /links/index.php?link=$1 [L,QSA]

Place the WordPress rules below the link rules.

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