Advertisement
mrcbrown

htaccess force SSL

Feb 9th, 2017
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  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.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement