Root level re-direct like facebook.com/my-name

How can I redirect www.mydomain.com/person.php?ref=my-name to www.mydomain.com/my-name

My attempt…

RewriteEngine on
RewriteBase /
RewriteRule ^([^/]+)/?$ /athlete.php?ref=$1 [L]

…Internal Server Error

Thank you.

sfw,

If you want to access the value of any key in a query string, you must use a RewriteCond to access the {QUERY_STRING} variable. See tutorial linked below for examples.

Regards,

DK