RewriteEngine on
RewriteCond  %{REQUEST_URI}  !^/i_files/(.*)
RewriteRule ^(.*)$ index.php\?link=$1 [L,QSA]