My installation is using alias in apache to redirect web traffic to proper folder. The alias is /prezentacje and it works well.
I had to modify .htaccess line to RewriteBase /prezentacje
On this address: http://servername/prezentacje/ I was able to install everything and system works fine except for the autologout.
The logout part works OK - after set amount of time I am logged out and redirected to login screen. But when I enter credentials I should be redirected to a webpage I was during logout but here is the problem - instead of being redirected to http://servername/prezentacje/āpage I was earlierā I am redirected to http://servername/āpage I was earlierā. The /prezentacje alias is removed.
The login procedure is OK because the session is created. If at that moment I enter manually correct url the page will be displayed with the correct user logged in.
It seems that only the url of previous page is improperly sent to browser.
I am not sure if it is problem with cms or url rewrite in .htaccess file (I havenāt changed anything else in that file)
When the system detects a session expiration, it will store the current route by calling a routine in the application framework we use (Slim2) - in the same way we generate other links around the application (and the same route that redirects you to the login page to begin with).
This will then be stored in a hidden field on the login page, called priorRoute. It sounds to me like this routine is detecting your URL incorrectly.
This is exactly what it does to determine that link:
$env['PATH_INFO'] is then what it uses for the link.
This can be found in /vendor/slim/slim/Slim/Environment.php L#147ā¦ any chance you can add some logging to file here to see what is being resolved in each case?
I have added a simple
ECHO $env[āPATH_INFOā];
on L#149 and it shows that on any page leading /prezentacje is omitted. For example:
/layout/view
/dashboard/status
/login
If I hover over any link in CMS the link is presented correctly (e.g. http://servername/prezentacje/layout/view) and everything works except the problem in question.
On any login page (also redirected form autologout) $env[āPATH_INFOā]; is: /login
I donāt know if it says anything new.
If this log is not enough please suggest what lines should I add to code.
I have made the change and so far it works correctly on Chrome and Edge
I will change the autologout time to a production setting and test it again but it seems that the change you suggested fixed the problem.