Forum Moderators: phranque
RewriteEngine on
RewriteCond %{QUERY_STRING} ^page=formulaire_etat_civil$
RewriteRule ^$ https://%{HTTP_HOST} [QSA,L]
I've tried a lot of combination but none work...
I just want to switch to SSL if the variable page is set to this value.
Eventually I would try to look for every URL and turn it into HTTP if the person is in HTTPS (don't want to ues too much resources on the server!)
Schematically (don't know if this vocable exists!)
If page is set to formulaire_etat_civil switch to HTTPS, in any other case if the protocol is HTTPS switch to HTTP.
If somebody could help :)
I couldn't think more about it after one day and a half... :)
Thanks :)
Some precision: I've read a lot of the post about the mod_reworite but no solutions works.
I've found one trick, which consist to add :SSL in the URL, but it didn't work if the person write the adress without https in the adress bar.
[edited by: Artesius at 8:36 am (utc) on Aug. 1, 2006]
Jim
[edited by: jdMorgan at 3:23 am (utc) on Aug. 2, 2006]
RewriteCond %{QUERY_STRING} ^page=formulaire_etat_civil$Why are you using a regEx here and not the lexicographically equal (=), which should have a better performance than a regEx has?
RewriteCond %{SERVER_PORT}!^443$
RewriteCond %{QUERY_STRING} =page=formulaire_etat_civil
RewriteCond %{SERVER_PORT} !=443 or for empty strings instead of
RewriteCond %{...} ^$ or
RewriteCond %{...} . this one, created esp. for that case to avoid a regEx:
RewriteCond %{...} ="" is there a special reason?
[edited by: Caterham at 7:58 pm (utc) on Aug. 9, 2006]