Advertisement
Guest User

Untitled

a guest
Apr 19th, 2014
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. <VirtualHost *:80>
  2. ServerName abc.com
  3. ServerAlias abc.com www.abc.com
  4. RewriteEngine on
  5. RewriteCond %{HTTPS} !=on
  6. RewriteRule ^/?(.*) https://%{SERVER_NAME}/ [NC,R,L]
  7. </VirtualHost>
  8.  
  9. RewriteCond %{HTTP_HOST} ^(www.)?abc.com$ [NC]
  10. RewriteCond %{HTTPS} off
  11. RewriteRule ^/?(.*)$ https://%{HTTP_HOST}/$1 [NE,R,L]
  12.  
  13. RewriteCond %{HTTP_HOST} ^(www.)?xyz.com$ [NC]
  14. RewriteCond %{HTTPS} on
  15. RewriteRule ^/?(.*)$ http://%{HTTP_HOST}/$1 [NE,R,L]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement