htaccess interfering with WampServer

After adding two lines of code to .htaccess, WampServer cannot connect to localhost (IE cannot open this page).  The rewrite module in httpd.conf is enabled.  Is there a fix for this?
Here is the code which is causing the issue:

RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
Who is Participating?
Dave BaldwinConnect With a Mentor Fixer of ProblemsCommented:
I think those lines tell it to add 'www' to the host name.  And there is no 'www.localhost'.  You need to remove them to connect to 'localhost'.
ddantesAuthor Commented:
OK.  Thank you.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.