And you can use the below htaccess
Options +FollowSymLinks
RewriteEngine on
#
# Redirect blog.example.com to wwwexamplecom/blog
RewriteCond %{HTTP_HOST} !^blog\.example\.com
RewriteCond %{HTTP_HOST} .
RewriteRule (.*) http://wwwexamplecom/blog/$1 [R=301,L]
#
# Redirect client requests for index.htm to /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.htm\ HTTP/
RewriteRule ^(([^/]+/)*)index\.htm$ http://wwwexamplecom/$1 [R=301,L]
#
# Redirect non-www to www
RewriteCond %{HTTP_HOST} ^example\.com
RewriteRule (.*) http://wwwexamplecom/$1 [R=301,L]