Forum Moderators: phranque

Message Too Old, No Replies

switching between HTTPS and HTTP

         

kknusa

9:46 pm on Jan 11, 2004 (gmt 0)

10+ Year Member



Hi everybody
i have a form that gets executed in an SSL environment so
h2tp://www.mysite.net/form.php goes to
h2tps://ssl.site.net/mysite.net/validate.php now i want to go back to use http so want to get
h2tp://www.mysite.net/index.php

ok now i tried to go from the https to http using Header function in php but didnt work so doing some further research i found .htaccess might be helpful

So is there any way to achieve this doing changes in the .htaccess?

JasonD

10:56 pm on Jan 11, 2004 (gmt 0)

10+ Year Member



Just to make sure I understand correctly.

You have a form on a non secure site that submits its data to a secure site.

Once your script gets the data from the script you want to redirect the user back to the non secure site.

Does your script print any output to the browser or are you simply redirecting via a relative link like:


header("Location: page.php");

a full link like:


header("Location: http://domain.dom/page.php");

or have I totally misunderstood?

EDITED DUE TO TYPO

kknusa

11:40 pm on Jan 11, 2004 (gmt 0)

10+ Year Member



yes you are right all the way , i have a shared SSL thus the certificate is not on my site.

so h2tp://www.mysite.com/login.php goes to
h2tps://ssl.site.com/mysite.com/validate.php and then this should go to
h2tp://www.mysite.com/page.php

Now as u have mentioned i have used header functions in the two ways that u said and even in the more general way as found in the php site but what happens is that it remains in the https
so instead of getting
h2tp://www.mysite.com/page.php
i get h2tps://ssl.site.com/mysite.com/page.php

JasonD

9:53 am on Jan 12, 2004 (gmt 0)

10+ Year Member



kkn,

Can I confirm that you send no output to the browser other than the header calls?

Jason

kknusa

4:43 pm on Jan 12, 2004 (gmt 0)

10+ Year Member



Yes u can i don't send anytything before the header

kknusa

10:01 pm on Jan 12, 2004 (gmt 0)

10+ Year Member



Any input on this one guys?

JasonD

11:00 am on Jan 13, 2004 (gmt 0)

10+ Year Member



Sorry I got tied up with clients.

On the final page can you right click and select properties then copy and paste the full URL in a sticky to me.

I have a feeling that the URL that is in the address bar is different to the real URL (that doing the above will reveal)

Also if I am wrong I can have a better look at it :D