htaccess redirection

To redirect all your pages to index.html or index page you can use following script on your .htaccess. This will redirect all pages/url to index.html. To use index.php instead of index.html simply change index.html to index.php.

You setup SSL on website but the website still opens on non ssl URL (http) instead of https? Use following script to force redirect to use https://www on your URL.

RewriteCond %{HTTPS} off# First rewrite to HTTPS:# Don't put www. here. If it is already there it will be included, if not# the subsequent rule will catch it.RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]# Now, rewrite any request to the wrong domain to use www.RewriteCond %{HTTP_HOST} !^www\.RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]