Closed ikwijaya closed 5 years ago
thank for merge.
Wow, This feature is not in master branch. I solved it with a similar fix (After reading this post, it is practically a clone):
public static function toPreviousViewedPageAfterLogin($path) { $protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' ? "https://" : "http://"; header('location: '.$protocol . $_SERVER['HTTP_HOST'] . '/' .$path); }
Thanks
Sir,
Wow, thanks for great framework. I used that with https, but if i force close my webpage, the redirect always use http:// protocol so i change code a bit. Path : application/core/redirect. here my code.
before :
public static function toPreviousViewedPageAfterLogin($path) { header('location: http://' . $_SERVER['HTTP_HOST'] . '/' . $path); }
here my edit :
public static function toPreviousViewedPageAfterLogin($path) { if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') { $protocol = "https"; } else { $protocol = "http"; } header('location: '. $protocol . '://' . $_SERVER['HTTP_HOST'] . '/' . $path); }
what about that?
regards ikwijaya