0
Welcome Guest! Login
0 items Join Now

Disable a script when using SSL

    • Rich Bean's Avatar
    • Rich Bean
    • Elite Rocketeer
    • Posts: 1194
    • Thanks: 1

    Disable a script when using SSL

    Posted 15 years 1 month ago
  • Re: Disable a script when using SSL

    Posted 15 years 3 weeks ago
    • Seems like a challenge. Could you please tell me what script you want to disable? Is the script loaded from an extension or just put manually?
    • Rich Bean's Avatar
    • Rich Bean
    • Elite Rocketeer
    • Posts: 1194
    • Thanks: 1

    Re: Disable a script when using SSL

    Posted 15 years 6 days ago
    • Hi Arifin,

      Sorry I didn't get back, this post slipped through.

      I'm loading the script manually in the index.php. But can also enable it as a plug in.

      Was thinking about something like this, but it doesn't seem to be working:
      if($_SERVER['HTTPS'] != "on"){
      include("toolbar.php");
      } else {
      echo '<center>Sorry no Toolbar in Secure mode.</center>';
      }
    • My Sites:
      Perth Website Design
      Scuba Marketing
      I'm a Henning Stalker!
    • Andy Miller's Avatar
    • Andy Miller
    • Preeminent Rocketeer
    • Posts: 9919
    • Thanks: 96
    • Web Kahuna

    Re: Disable a script when using SSL

    Posted 15 years 6 days ago
    • Alternatively you can use relative URLs rather than absolute URLS (ie, don't include the my.server.com/ bit) when you are pointing to a .js or .css file etc. That way it will not throw the error if you are in SSL mode or not.
    • Rich Bean's Avatar
    • Rich Bean
    • Elite Rocketeer
    • Posts: 1194
    • Thanks: 1

    Re: Disable a script when using SSL

    Posted 15 years 6 days ago
    • Andy Miller's Avatar
    • Andy Miller
    • Preeminent Rocketeer
    • Posts: 9919
    • Thanks: 96
    • Web Kahuna

    Re: Disable a script when using SSL

    Posted 15 years 5 days ago
    • does it support https:// ? if so then you could use some logic to load the correct version:
      <?php 
      if($_SERVER['HTTPS']){  
        echo "<script src='https://cdn.wibiya.com/Loaders/Loader_285190.js' type='text/javascript'></script>";
      }else{ 
        echo "<script src='http://cdn.wibiya.com/Loaders/Loader_285190.js' type='text/javascript'></script>"
      } 
      ?> 
    • Rich Bean's Avatar
    • Rich Bean
    • Elite Rocketeer
    • Posts: 1194
    • Thanks: 1

    Re: Disable a script when using SSL

    Posted 15 years 5 days ago

Time to create page: 0.078 seconds