.htaccess Useful tips

To disable directory Browsing :


# To Disable Directory Browsing
Options All -Indexes

Domain Redirection:

.htacces code for redirecting yourdomain.com to www.yourdomain.com


RewriteCond %{HTTP_HOST} ^yourdomain.com
RewriteRule (.*) http://www.yourdomain.com/$1 [R=301,L]

To Hide the Extension:


RewriteRule ^([^/.]+)/?$ $1.html