Sunday, June 23, 2019

Force domain to https using .htaccess file

using the code your website redirect to HTTPS. You just place below code in your .htaccess file. It will reflect your server within 2 second.

# force ssl
RewriteCond     %{SERVER_PORT} ^80$
RewriteRule     ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]

1 comment: