Add this to your main directory's .htaccess file:

Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteRule ^([a-zA-Z0-9]*)$ /users.php?m=details&name=$1 [R,L]

Also, make sure you do not have an "ErrorDocument 500" command line in the same .htaccess file.