Apache error: .htaccess: Invalid command ‘RewriteEngine’, perhaps misspelled or defined by a module not included in the server configuration

This time a simple error and simple explanation. I installed a nice WAMP package called WampServer and I got an error on a site that worked fine on other servers. The error I found in the logs was:

.htaccess: Invalid command ‘RewriteEngine’, perhaps misspelled or defined by a module not included in the server configuration

Virtual Hosts in Windows under WAMP

Do you want to call your localhost websites from a webbrowser using nice URLs like: mysite.dev or somethingelse.dev? Here’s a way how to do this under Windows.
First edit your Apache’s httpd.conf file. Look for “DocumentRoot” and then change into something like this (“e:/wamp/www” is the path to my sites):

DocumentRoot "e:/wamp/www/"
NameVirtualHost 127.0.0.1
<VirtualHost 127.0.0.1>
[...]

 
TopOfBlogs Web Development & Design Blogs