Jump to content

dsince1984

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Everything posted by dsince1984

  1. Yeah, I figured it out. Our server guy was requiring the encryption so it didn't care what I had on a page. If the original URL wasn't https it would complain. Once he just applied SSL to the page but unchecked the box requiring it, it started working.
  2. This is probably some silly mistake but I can't figure out why this code isn't working. I put this at the top of my php page: <?php $https_url = 'https://somesite.com'; if ( isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] == 'off' ) { header('location: ' . $https_url); exit; } else if ( !isset( $_SERVER['HTTPS']) && $_SERVER['SERVER_PORT'] == 443 ) { header('location: ' . $https_url); exit; } ?> When I was just trying this code out it worked and redirected to https. No errors no infinite loops...it worked perfectly. However, once our server guy actually applied the SSL to the page, the code stopped working and I get the error "The page must be viewed over a secure location." It throws the error before it processes anything on that page. I found the code online on another help forum and it worked for everyone else, so what am I doing wrong? I also tried a different version of the code that also works for everyone else but got the same error. Thanks for your help!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.