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

Post non-phpwcms related topics here - but I don't want to see "hey check this or that other cms". Post if you have a point or worthwhile comment, don't post just to increase you post count!
Post Reply
1996 328ti
Posts: 317
Joined: Mon 19. Apr 2004, 06:10
Location: Greenville, SC USA
Contact:

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

Post 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.
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

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

Post by Jensensen »

try
[x]
Last edited by Jensensen on Sat 20. Sep 2008, 20:18, edited 1 time in total.
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
1996 328ti
Posts: 317
Joined: Mon 19. Apr 2004, 06:10
Location: Greenville, SC USA
Contact:

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

Post 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?
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

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

Post by Jensensen »

[x]
Last edited by Jensensen on Sat 20. Sep 2008, 20:17, edited 1 time in total.
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
1996 328ti
Posts: 317
Joined: Mon 19. Apr 2004, 06:10
Location: Greenville, SC USA
Contact:

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

Post 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
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

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

Post by update »

Perhaps it is a good idea to adapt the rewrite conditions in htaccess ?
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
Post Reply