RewriteEngine On
RewriteBase /r/
RewriteRule ^([A-Za-z0-9_-]+)$ index.php?ref=$1 [L,QSA]
