Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save fernandovaller/1b0414f9bf750643d30e6b5cadb0edb6 to your computer and use it in GitHub Desktop.
Save fernandovaller/1b0414f9bf750643d30e6b5cadb0edb6 to your computer and use it in GitHub Desktop.
Usando o cloud Flare aplicar essa regra
#Se a requisição não for https force https
RewriteCond %{HTTP:X-Forwarded-Proto} =http
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
#se na requisição nao tiver www force www
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment