The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
https on cirtain pages
#2
Hmm. I don't usually tell people to edit the header directly, but I think that's the cleanest way to do it.

Note that when you're doing updates, you should make sure that we didn't edit users/includes/header.php

So what you'll do is create an array of pages you don't want ssl for in this snippet below and use it to replace the if force_ssl == 1 thing in header.php

Code:
if ($settings->force_ssl==1){
Code:
$nossl = ['index.php','account.php'];
Code:
if(!in_array($currentPage,$nossl)){
Code:
if (!isset($_SERVER['HTTPS']) || !$_SERVER['HTTPS']) {
Code:
$url = 'https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
Code:
Redirect::to($url);
Code:
exit;
Code:
}
Code:
}
Code:
}
  Reply


Messages In This Thread
https on cirtain pages - by Busy Tech - 01-13-2018, 01:30 PM
https on cirtain pages - by mudmin - 01-13-2018, 02:20 PM
https on cirtain pages - by Busy Tech - 01-13-2018, 03:00 PM
https on cirtain pages - by mudmin - 01-15-2018, 05:52 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)