Skip to content

Instantly share code, notes, and snippets.

@ahmedghazi
Created March 12, 2018 15:07
Show Gist options
  • Save ahmedghazi/8bf1700805598ea7af899fba7bd20ef0 to your computer and use it in GitHub Desktop.
Save ahmedghazi/8bf1700805598ea7af899fba7bd20ef0 to your computer and use it in GitHub Desktop.
HTTPS HTACCESS
# Redirection vers HTTPS
#RewriteCond %{SERVER_PORT} ^80$ [OR]
#RewriteCond %{HTTPS} =off
#RewriteRule ^(.*)$ https://site.tld/$1 [R=301,L]
# Redirection du www vers non-www en HTTPS
#RewriteCond %{HTTP_HOST} ^www\.site\.fr [NC]
#RewriteRule ^(.*)$ https://site.tld/$1 [R=301,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment