RewriteEngine on
RewriteRule ^l/([^/\.]+)/?$ link.php?link=$1 [L]