[Help] [How To] Force HTTPS redirect on HTTP , Using htaccess ?

Respected Sir/Madam,

How To Force HTTPS redirect on HTTP Encounter, by Editing “.htaccess” file in “/htdocs/” ?

What I tried :

RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

This keeps on Looping coz the %{HTTPS} is always equal to off even when it’s redirected to https://%{HTTP_HOST}%{REQUEST_URI}.

So how can I do the same with out looping?
And Successfully redirecting all insecured connection to HTTPS.

Thanking you.


Sorry , I forgot to add my user account UserName : rfgd_20369307

Try using these codes instead: https://infinityfree.net/support/how-to-force-all-traffic-to-https

Yaaaa!!! :slight_smile: :smiley:
It works… Thanks :smiley:

Sorry that I didn’t see that.
I did went through Support , but I missed it some how :# , sorry for giving you trouble. :cry:

Thanking you. :slight_smile: