Here is the code I'm currently using (I have other stuff in it but this will pertain to this article):
Code:
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^$ index.php
RewriteRule (^[-_A-Za-z0-9\ ]*$) member.php?&username=$1
I just wanted to make note that you must use a trailing slash at the end of your links to directories or you will get an error message saying that user does not exist. For example, if you have a gallery and you link to it like yoursite.com/gallery then
you will need to change the url in your navigation to yoursite.com/gallery
/ so the mod rewrite doesn't treat it like a username.
Check your navigation to all areas of your site once you've used the mod rewrite code.
If you are using 3.7.0 beta 4 and want to change the url in member profiles to reflect their new profile url so they know what it is...
Edit the template "memberinfo_block_contactinfo" and find this code:
Code:
<dd><a href="$prepared[profileurl]">$prepared[profileurl]</a></dd>
and change it to:
Code:
<dd><a href="http://www.yoursite.com/$userinfo[username]">http://www.yoursite.com/$userinfo[username]</a></dd>
You will need to change yoursite.com to that of your forum. So if your forum is yoursite.net/forum or forums.yoursite.org or whatever, then be sure to change it as so.