RewriteEngine on RewriteRule ^([A-Za-z0-9]+)(/)?$ user.php?username=$1 RewriteRule ^([A-Za-z0-9]+)/friends(/)?$ user.php?username=$1&display=friends RewriteRule ^([A-Za-z0-9]+)/syndications(/)?$ user.php?username=$1&display=syndications