htaccess interferes with virtual host

I'm using WampServer on a Windows 7 platform.  Yesterday I modified my .htaccess in order to redirect requests for my website with the www prefix to the non-www version, and also redirect requests for index.htm to the root landing page.  After making these changes, I can't access my site through virtual host.  The Apache error log contains this entry:

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

Here is the .htaccess code.  The AdaptiveImages portion is unchanged, and did not result in this issue:

<IfModule mod_rewrite.c>
  Options +FollowSymlinks
  RewriteEngine On

  # Adaptive-Images -----------------------------------------------------------------------------------

  # Add any directories you wish to omit from the Adaptive-Images process on a new line, as follows:
  RewriteCond %{REQUEST_URI} !js
  RewriteCond %{REQUEST_URI} !css
  RewriteCond %{REQUEST_URI} !scgi
  RewriteCond %{REQUEST_URI} !secure  
  RewriteCond %{REQUEST_URI} !assets
  RewriteCond %{REQUEST_URI} !images/view.jpg
  RewriteCond %{REQUEST_URI} !images/StWVT.jpg
  RewriteCond %{REQUEST_URI} !images/StWVTsmall.jpg
  RewriteCond %{REQUEST_URI} !images/TdwVT.jpg
  RewriteCond %{REQUEST_URI} !images/TdwVTsmall.jpg

  # don't apply the AI behaviour to images inside AI's cache folder:
  RewriteCond %{REQUEST_URI} !ai-cache
   
  # Send any GIF, JPG, or PNG request that IS NOT stored inside one of the above directories
  # to adaptive-images.php so we can select appropriately sized versions
 
  RewriteRule \.(?:jpe?g|gif|png)$ adaptive-images.php

  # END Adaptive-Images -------------------------------------------------------------------------------
</IfModule>


# redirect requests with www prefix
RewriteEngine on
RewriteCond %{HTTP_HOST} !^mauitradewinds.com [NC]
RewriteRule ^/?(.*)$ http://mauitradewinds.com/$1 [L,R=301]

RewriteEngine On
RewriteBase /

# redirect index.htm to the root domain
RewriteRule ^index\.htm$ / [NC,R,L]
LVL 1
ddantesAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

GaryCommented:
Sounds like the mod_rewrite module is not enabled
In httpd.conf look for mod_rewrite.so and remove the # from the beginning of that line
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ddantesAuthor Commented:
Perfect.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.