How to control https
I'm familiar with unix in general, but not cpanel. I've installed an ssl certificate,
work fine but how do you control which gets used and where? I'd like to use https for login urls and forms with passwords, but I get the impression ssl needs to be used on the entire domain, is that true? I have a php application which would respond if I could set: SetEnv HTTPS on I tried .htaccess rewrites but results are wildly unpredictable, requests for port 80 and 443 both go to the same .htaccess file
http://www.example.com and https://www.example.com work fine but how do you control which gets used and where? I'd like to use https for login urls and forms with passwords, but I get the impression ssl needs to be used on the entire domain, is that true? I have a php application which would respond if I could set: SetEnv HTTPS on I tried .htaccess rewrites but results are wildly unpredictable, requests for port 80 and 443 both go to the same .htaccess file
#RewriteCond %{HTTPS} off
#RewriteCond %{REQUEST_URI} ^/login
#RewriteRule ^(.*)$ -
was trying to use my-domain dot com as an example, but guess it's not the best choice. I have nothing to do with consolidated armor products 0 -
Sorted that for you. ;) 0 -
Hello :) You will need to use custom Mod_Rewrite rules in your .htaccess file if you want certain http requests redirected to https. You may want to post on a forum such as StackOverflow for specific guidance on what type of custom rules you could implement. Thank you. 0 -
What does that mean, It'll never work? Ok how about for an standard user of cpanel, how do you setup https? 0 -
ok well for anyone else experiencing strangeness applying https, the following does work to apply https to the entire site. My issue was with the application cache not cpanel. RewriteEngine On RewriteBase / RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]0 -
I am happy to see the issue is now resolved. Thank you for updating us with the outcome. 0
Please sign in to leave a comment.
Comments
6 comments