Page 1 of 1

switching from non-secured to secured site based on page nam

Posted: Sun 10. Feb 2008, 17:58
by 1996 328ti
Probably not a phpwcms specific question.

I use an external context CP to embed a form on my page.
It is to be part of the secured website.

Is there a way to switch from http:// to https:// whenever /registration.phtml is displayed?
Then back from https:// to http:// when the user goes to another page.

I guess I can just have the entire site be under https://, but I would like to be able to switch back and forth.

Re: switching from non-secured to secured site based on page nam

Posted: Mon 11. Feb 2008, 01:27
by Jensensen
try
[x]

Re: switching from non-secured to secured site based on page nam

Posted: Mon 11. Feb 2008, 02:44
by 1996 328ti
I do think it could be done using the .htaccess file.

But I get mysite.org/registration.phtml?registration which causes an error.
The entire site is SSL, so maybe it's just best to redirect http:// to https:// and leave it at that?

Re: switching from non-secured to secured site based on page nam

Posted: Mon 11. Feb 2008, 03:03
by Jensensen
[x]

Re: switching from non-secured to secured site based on page nam

Posted: Mon 11. Feb 2008, 03:16
by 1996 328ti
I understand.
But it doesn't work properly.

I get an error, "The page isn't redirecting properly" because the url reads
https://www.mysite.com/registration.phtml?registration instead of https://www.mysite.com/registration.phtml

Re: switching from non-secured to secured site based on page nam

Posted: Mon 11. Feb 2008, 08:51
by update
Perhaps it is a good idea to adapt the rewrite conditions in htaccess ?