Force SSL

Im in config/redirects.php and I want to use $config['ssl'].
$config['ssl'] = array('production' => array('/packages/:any', '/user/:any'));

Am I using that correctly? It doesn't seem to work
http://fatjacksports.com/user/

Comments

  • edited July 2018

    Did you set up your environment's production to use the domainfatjacksports.com in the fuel/application/environments.php file?

  • $environments = array(
    'development' => array('112e9bb6a9.nxcli.net'),
    'production' => array('fatjacksports.com'),
    );

  • I can echo out the ENVIRONMENT constant in my footer but if I echo out my $config['ssl'] there's nothing.

    echo ENVIRONMENT; // production
    echo $config['ssl']; //

  • remove the forward slash at the front of the URLs:

    $config['ssl'] = array('production' => array('packages/:any', 'user/:any'));
    
  • I need this to be with the entire site now. I tried

    RewriteCond %{SERVER_PORT} 80

    RewriteCond %{HTTP_HOST} ^(www.)?fatjacksports.com

    RewriteRule ^(.*)$ https://www.fatjacksports.com/$1 [R,L]

    in the .htaccess fike and I get a too many redirects error.

    My host says I need to change the basse url in the database to https://. What table would that be located?

  • Look in the fuel/application/config/config.php file where it uses the constant of BASE_URL. Hard code that to your own value instead.

Sign In or Register to comment.