RewriteEngine on
RewriteRule ^projects/([^/\.]+)/?$ project.php?id=$1 [L]