daily pastebin goal
61%
SHARE
TWEET

Untitled

a guest Feb 13th, 2018 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <VirtualHost IP:80>
  2.  
  3.    # https/http www -> https non-www
  4.  
  5.    RewriteCond %{HTTP_HOST} ^www.(.*)$ [NC]
  6.    RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
  7.  
  8.    # http non-www -> https non-www
  9.    RewriteCond %{HTTPS} !=on
  10.    RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
  11.  
  12. </VirtualHost>
  13.  
  14. <VirtualHost IP:443>
  15.  
  16.    # I removed this from 443 and the same result
  17.    # https/http www -> https non-www
  18.    RewriteCond %{HTTP_HOST} ^www.(.*)$ [NC]
  19.    RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
  20.  
  21. </VirtualHost>
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