Skip to content

Instantly share code, notes, and snippets.

@daronspence
Created August 2, 2016 02:40
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save daronspence/ddecc024eda111b38d389368fdbd0cc6 to your computer and use it in GitHub Desktop.
Redirect and preserve POST requests
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_METHOD} GET
RewriteRule ^(.*)$ https://example.com/$1 [R=301,L]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://example.com/$1 [R=307,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment