No announcement yet.

Can you use sc_redir to go from a secure page to a non secure page?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Can you use sc_redir to go from a secure page to a non secure page?

    After a purchase of a subscription, the user is "sent" to a secure "php" application on the project site, and the app adds details to the user database etc, and then that php app does a sc_redir to a non secure web page that has a thanks you message.

    However, the resultant URL passed to the web site includes https:\\ and not http:\\ The string variable that contains the URL details, being passed using sc_redir, explicitly uses http:\\ in the URL string.

    It therefore brings up a page not found error as the "web site" (not where the project is run) is not a "secure" site.

    I am missing something, or is it not working as I thought it should.



  • #2
    Appearantly SC is changing url. Most likely because sc_redir is a macro that allows different syntax. A solution could be to use a blank application that performs the redir in a standard php way like:
     function redirect($url, $statusCode = 303) {    header('Location: ' . $url, true, $statusCode);    die(); }
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development /


    • #3
      Thanks Albert,

      I think I found the answer, but thanks for your comments, they have been duly noted for the future.

      The web site was a Joomla site and I had embedded some PHP code into the content on the page, but it seems I forgot to switch on the plugin called DirectPHP that picks it up and renders it.

      Anyway, it worked late last night, but it left me thinking about it all night wondering whether that was the answer or not <g>