daily pastebin goal
72%
SHARE
TWEET

htaccess force SSL

mrcbrown Feb 9th, 2017 9 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ---
  2. RewriteEngine On
  3. RewriteCond %{SERVER_PORT} 80
  4. RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]
  5. ---
  6. Replace example.com with your domain name and place it in a .htaccess file in your public_html folder, this will push users to your SSL based site. Please ensure you've enabled Let's Encrypt First.
RAW Paste Data
Top