Skip to content

Instantly share code, notes, and snippets.

@junaidtk
Created October 3, 2018 14:36
Show Gist options
  • Save junaidtk/f64ff6a8ccfa996593053df73691eddc to your computer and use it in GitHub Desktop.
Save junaidtk/f64ff6a8ccfa996593053df73691eddc to your computer and use it in GitHub Desktop.
Convert http request to https
We need to add the below code in between <IfModule mod_rewrite.c>
# Rewrite HTTP to HTTPS
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*) https://%{SERVER_NAME}/$1 [R,L]
The above code will load the https url instead of http
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment