Guest User

Untitled

a guest
Oct 18th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. http://www.example.com
  2.  
  3. http://example.com
  4.  
  5. https://www.example.com
  6.  
  7. RewriteEngine on
  8.  
  9. RewriteCond %{HTTP_HOST} ^www.(.*)$ [NC]
  10. RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
  11.  
  12. RewriteCond %{HTTPS} !on
  13. RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
  14.  
  15. RewriteCond %{HTTPS_HOST} ^www.(.*)$ [NC]
  16. RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
Add Comment
Please, Sign In to add comment