Skip to content

Instantly share code, notes, and snippets.

@ashsaraga
Created May 31, 2018 20:23
Show Gist options
  • Save ashsaraga/e5ba6aa38165a9bdb344dc3bbff18fae to your computer and use it in GitHub Desktop.
Save ashsaraga/e5ba6aa38165a9bdb344dc3bbff18fae to your computer and use it in GitHub Desktop.
Include in the site's `-le-ssl.conf` file to avoid redirect loop on HTTPS request.
RewriteEngine on
RewriteCond %{SERVER_NAME} =www.example.com
RewriteRule ^ https://example.com%{REQUEST_URI} [END,NE,R=permanent]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment