View Single Post
  #2  
Old 12-25-2020, 11:56 PM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 88,452
Kyttias is on a distinguished road
Default

I'm using https with my install. In the htaccess file, make sure this line says https instead of http if you're using https:

PHP Code:
RewriteRule https://%1%{REQUEST_URI} [L,R=301] 
Which unnecessary redirect are you referring to? After login? In view/loginview.php I simply replaced the page it lands on with an immediate redirect. (Note: If you're going to attempt to leave the existing code in, just make sure the header redirect is the first thing in the function and the rest is commented out. Any page rendering will break a header redirect.)

PHP Code:
public function index(){
    
header('Location: ' $_SERVER['HTTP_REFERER']);
}
    
public function 
logout(){
    
header('Location: ' $_SERVER['HTTP_REFERER']);


These ones bounce back to the last page you were on, alternatively, if you'd rather they end up at the index, use
PHP Code:
 header"Location: /" ); 
I'm actually in the process of doing the same with inventory and shop and various other places where a redirect feels more expected than a confirmation screen, but I haven't had time to dig into the exact functions.
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it.
Reply With Quote