.htaccess不允许访问wamp服务器中的项目目录

This is my htaccess file code. This code is not allowing me to access my project directory.

Code

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ profile.php?username=$1

Please help me in solving this problem. Thanks

Error:

The server encountered an internal error or misconfigured and was unable to complete request.

go to Apache wamp\bin\apache\Apache2.4.4\conf\httpd.conf

and search for line

#LoadModule rewrite_module modules/mod_rewrite.so

and un comment it

LoadModule rewrite_module modules/mod_rewrite.so

the problem will be solved !