Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.[a-z-]+\.[a-z]{2,6} [NC]
RewriteCond %{HTTP_HOST} ([a-z-]+\.[a-z]{2,6})$ [NC]
RewriteRule ^(.*)$ http://www.%1/$1 [R=301,L]

RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^sitemap.xml$ sitemap.php?t=map [Last,QSA]
RewriteRule ^robots.txt$ sitemap.php?t=robot [Last,QSA]

RewriteBase /

RewriteCond %{THE_REQUEST} ^.*\/index\.php?\ HTTP/

RewriteRule ^(.*)index\.php?$ "/$1" [R=301,L]