Apache/htaccess to HTTPS if SSL cert is installed
Hi,
I have a platform for example with different domains/subdomains and when I update my script for all domains/subdomains it updates all files with changes... so when I update for example .htaccess it changes everywhere and I need something like this:
Domain X hasn't SSL installed, Domain Y has, so how to change htaccess or httpd conf to know if Domain Y has SSL installed and redirect all traffic to https? But Domain X hasn't and redirect all to http? Is this possible? I think it's not possible in htaccess but maybe in httpd conf?
etc. is not working because it just know if USER uses HTTPS or HTTP, not this domain...
How to figure it out?... please help
Hi,
I have a platform for example with different domains/subdomains and when I update my script for all domains/subdomains it updates all files with changes... so when I update for example .htaccess it changes everywhere and I need something like this:
Domain X hasn't SSL installed, Domain Y has, so how to change htaccess or httpd conf to know if Domain Y has SSL installed and redirect all traffic to https? But Domain X hasn't and redirect all to http? Is this possible? I think it's not possible in htaccess but maybe in httpd conf?
Code:
RewriteCond %{HTTPS} !=on
How to figure it out?... please help
Last edited: