RewriteEngine on # RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.(html?¦php)\ HTTP/ RewriteRule index\.html$ http://www.example.com/%1 [R=301,L] # RewriteCond %{REQUEST_URI} ^(.*)//(.*)$ RewriteRule . http://www.example.com%1/%2 [R=301,L] # RewriteCond %{HTTP_HOST} !^www\.example.com\.com RewriteRule (.*) http://www.example.com/$1 [R=301,L] Directoryindex index.html This is code i am trying but getting 500 internal server error. Though i am able to remove some problem. Options +FollowSymlinks RewriteEngine on rewritecond %{http_host} ^wondersofrajasthan.com [nc] rewriterule ^(.*)$ http://www.wondersofrajasthan.com/$1 [r=301,nc] This much code is working but when i paste all it is showing error. Any one could suggest me.