RewriteEngine on
Options FollowSymLinks
Options SymLinksIfOwnerMatch
RewriteRule ^([0-9]*)/?$ index.php?f=$1 [L,QSA]