Trying to clean up duplicate content with .htaccess

Trying to clean up duplicate content with .htaccess
I’m trying to route the www. to the non www
To route the /index.html to /

Can you help me and see if this .htaccess will work?
Thank You

RewriteEngine On

# Redirect from www to non www
RewriteCond %{HTTP_HOST} ^www\\.site\\.com$ [NC]
RewriteRule ^(.*)$ http://site.com/$1 [L,R=301]

# Rewrite index.html to root
RewriteRule ^index\\.html$ http://site.com/ [L,R=301]

rs,

You might benefit from reading the mod_rewrite tutorial linked in my signature as it contains explanations and sample code. It’s helped may members and should help you, too.

Regards,

DK

Thanks DK I appreciate your input.