daily pastebin goal
11%
SHARE
TWEET

htaccess force SSL

mrcbrown Feb 9th, 2017 49 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
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top