Hello,
 
I am attempting to redirect traffic for 1 vhost only to https and allow http to another… I'm trying to do this with mod_rewrite and having no success. Any suggestions?  See code below:
 
# This one we want http access to
<VirtualHost otherdomain.com>
   ServerName www.otherdomain.com
   DocumentRoot /var/www/html
</VirtualHost>
 

# this one we want https to
<VirtualHost servername:80>
    ServerName www.servername.com
    DocumentRoot /var/www/html
    <Directory /var/www/html>
        AllowOverride All
        RewriteEngine On
        RewriteCond %{SERVER_PORT} !^443$
        RewriteRule (.*) https://%{SERVER_NAME}$1 [L,R]
    </Directory>
</VirtualHost>
 
#SSL.conf
<VirtualHost _default_:443>
DocumentRoot "/var/www/html"
ServerName www.servername.com:443
[ssl stuff]
</VirtualHost>



CONFIDENTIALITY NOTE
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential
and/or privileged material.  Any review, retransmission,
dissemination or other use of, or taking of any action in
reliance
upon, this information by persons or entities other than the
intended
recipient is prohibited. If you received this in error, please
contact the sender and delete the material from any computer.

Reply via email to