Problem with (re)login

Post Reply
User avatar
stani
Master Bludit
Posts: 120
Joined: Wed Oct 14, 2020 1:34 pm
Has thanked: 6 times
Been thanked: 3 times

The problem may occur with some web hosts, especially where domains are aliases.

Bludit 3.22.0 is installed normally, a password is set, and you are taken to the administration.

But when I log in to the administration again, I can't log in anymore, the login window just pops up, nothing happens, no error message. "Clear cookies and saved data" in the browser or using a different browser doesn't help.

I found the solution via Gemini: log in via FTP to the /bl-content/databases/ folder and open-edit the "site.php" file. Find the "url" item in it and check what is written there.

If there is something like "url":"https:\/\/MYDOMAIN.com\/domains\/MYDOMAIN.com\/", it is incorrect.

The entry "url":"https:\/\/MYDOMAIN.com\/domains\/MYDOMAIN.com\/" means that Bludit incorrectly detected its location during installation and thinks that its homepage is in the subdirectory /domains/MYDOMAIN.com/ (which is the internal folder structure on FTP for some hosting). But you only enter the address (https://MYDOMAIN.com/) in the browser. As soon as you click on login, Bludit tries to redirect you to the non-existent internal address, the security token (CSRF) fails and the form just bounces.

The fix is ​​simple: just edit the "site.php" file like this: "url":"https:\/\/MYDOMAIN.com\/" and save.

Note: It doesn't have to be just the main domain (MYDOMAIN.com), but it also applies to the subdomain: "mysubdomain.MYDOMAIN.com".
Post Reply