Force browser to use https protocol

Add following snippet to your htaccess and redirect entire website to https.

RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}



  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Using .htaccess to Rewrite something

Something great here about using .htaccess to rewrite.

Forwarding domain to subdomain using .htaccess

Tell all about how to forward one domain to a subdomain.

Control access to files at directory level

.htaccess is most often used to restrict or deny access to individual files and folders. A...

Rewrite URLs Using .htaccess

Rewriting product.php?id=12 to product-12.htmlRewriteEngine onRewriteRule...