title: How do I achieve a url like www.example.com/username to redirect to www.example.com/user/profile.php?uid=10?
body: <p>On my site, user profiles can be reached by the url <code>www.example.com/user/profile.php?uid=3</code>
  I want to make it easier for users to reach their profile by simply requesting for <code>www.example.com/username</code></p>
  
  <p>Each users has a username that cannot change. How can I do this? </p>
  
  <pre><code>Here is my current .htaccess file
  
  Options +FollowSymLinks -MultiViews
  # Turn mod_rewrite on
  RewriteEngine On
  RewriteBase /
  
  # If the request is not for a valid directory
  RewriteCond %{REQUEST_FILENAME} !-d
  # If the request is not for a valid file
  RewriteCond %{REQUEST_FILENAME} !-f
  # If the request is not for a valid link
  RewriteCond %{REQUEST_FILENAME} !-l
  # finally this is your rewrite rule
  RewriteRule ^blog/(.+)$ blog.php/$1 [L,NC]
  RewriteRule ^(.+)$ user_page/profile.php?uid=$1 [L,QSA]
  </code></pre>