How to redicrect always on https

Started by harpreet9629, January 23, 2017, 03:01:34 PM

Previous topic - Next topic

harpreet9629

hi,

There is any way to redirect on https always. like as https://server-ip:2030 always.

Thanks

je2u

Add to htaccess

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTPS} !=on [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>