Skip to content

Instantly share code, notes, and snippets.

@jnicol
Created April 28, 2025 01:22
Show Gist options
  • Save jnicol/893b84c24c9e38e06e51a6426d814396 to your computer and use it in GitHub Desktop.
Save jnicol/893b84c24c9e38e06e51a6426d814396 to your computer and use it in GitHub Desktop.
.htaccess redirect insecure traffic to https
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment