Move Zen Cart from .htm and .html and wish to redirect all urls?

How to redirect all .htm and .html urls to the root?
 
Below is the example:
 
RewriteEngine On
RewriteCond %{HTTP_HOST} (www.)?domain.com
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\.htm(.*)$ http://www.domain.com/? [R=301,L]
 
RewriteEngine On
RewriteCond %{HTTP_HOST} (www.)?domain.com
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\.html(.*)$ http://www.domain.com/? [R=301,L]

Add Feedback