I had started posting
in the Encryption snippet support thread, but the more I think about it, the more I am convinced it’s more of a htaccess subject so I move the details here.
Here is my problem.
I have
a website (Work in Progress) for which I need to have both http and https pages.
This website is using both the
SEO Strict URLs plugin to avoid duplicate pages and the
Encryption snippet to avoid having to switch https for the whole website.
The Encryption snippet works fine : when I set the TV to "On" the selected pages are served as https (example
here) while the unselected ones are served as http (so far, so good).
One trouble though, if I don’t modify the .htaccess, I have ssl warnings (not good

)
As instructed in the default .htaccess I have uncommented the port 443 conditionnal rewrite rules :
[tt]# Rewrite secure requests properly to prevent SSL cert warnings, e.g. prevent
#
https://www.domain.com when your cert only allows
https://secure.domain.com
RewriteCond %{SERVER_PORT} !^443
RewriteRule (.*)
https://www.pargade-notaires.fr/$1 [R=301,L][/tt]
New problem : if I do so, then the whole website is in https

It’s strange since the default server port is not 443 and the https rewrite should occur only if SERVER_PORT is 443, or am I mistaken ?
(FYI, config is in my sig I am running Apache 2.2.8 )
Now, there is an alternate .htaccess intended to be used with the Encryption snippet :
[tt]RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{SERVER_PORT} 443
RewriteRule ^(.*)$ ~foo/index.php?q=$1 [L,QSA][/tt]
Which indicates that I am supposed to use different "folders" for http and https...
Might be a problem, since
my intent is to have both http and https pages on the same domain : is that doable or not ?
One thing I should add also is that I use a workaround to have files served for http and https from the same public_html folder (instead of having secure pages into the private_html folder) : Gildas advised me to create a sym link, which is what I did helped with my server admin :
[tt]ln -s public_html private_html[/tt]