TEXT 37
Htaccess - force ssl By micha on 11th June 2021 11:02:08 AM
  1. # HTTPS Force #
  2.  
  3. RewriteEngine On
  4. RewriteCond %{HTTPS} !=on
  5. RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  6.  
  7. # or
  8.  
  9. RewriteEngine On
  10. RewriteCond %{HTTPS} off
  11. RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Paste is for source code and general debugging text.

Login or Register to edit, delete and keep track of your pastes and more.

Raw Paste

Login or Register to edit or fork this paste. It's free.