redirect with virtual_host when ssl enable

chrisly

Verified User
Joined
Apr 26, 2005
Messages
26
Hello,

I want redirect http to https with apache virtual host config.

How can I add this line `Redirect / https://www.|DOMAIN|` in custom/virtual_host2.conf when `Secure SSL` is enabled for this domain?
Is there a variable to check for this?

Or is there another method to do this?

Best regards,

Christiaan Bos
 
I had seen that link.
But the variable SSL_TEMPLATE is always 0 in the non-ssl-http-virtual-host-section.
I want only a redirect when SSL is enabled for a domain.

Is there another variable wich I can use?
 
Click "Available Tokens" to see all available tokens, which you can use and test in your environment.

Possible solution is to check value of CERT

Code:
CERT=/etc/httpd/conf/ssl.crt/server.crt
if you don't use the server wide cert for users domains.
 
Back
Top