Topic on Project:Support desk

Private Wiki Requires Two Logins

9
67.131.21.67 (talkcontribs)

Hey,

Whenever anyone on our private wiki tries to sign in, it redirects to the index.php page and then when you try to do anything else it redirects to another login page. I already verified that our $wgServer variable is set properly and I don't know what else to do.

It's really annoying, hopefully there's a fix.

Cheers o/

Ciencia Al Poder (talkcontribs)

Are you using "short" or "pretty" URLs? I mean viewing articles have a different URL structure than when editing (/wiki/ vs /index.php or similar). Because cookie path may be the problem here. See Manual:$wgCookiePath

67.131.21.67 (talkcontribs)

Oops, forgot to use the reply button. But, for a little more information, when you visit wiki.domain.com it goes to wiki.domain.com/index.php. If you go to domain.com/wiki/index.php it still works the same.

67.131.21.67 (talkcontribs)

Hi, I'm a little confused on what you mean. Our Wiki is on wiki.domain.com, but the directory is on /wiki. When I tried setting $wgCookiePath, the Wiki didn't load at all.

Ciencia Al Poder (talkcontribs)

If the wiki doesn't load at all, you made a typo when adding that configuration.

Try:

$wgCookiePath = '/';

Still, this is the default value and should work for you unless you changed it.

67.131.21.67 (talkcontribs)

Hi,

When I did that, it said the following message when I tried logging in: "There seems to be a problem with your login session; this action has been canceled as a precaution against session hijacking. Go back to the previous page, reload that page and then try again."

Ciencia Al Poder (talkcontribs)
67.131.21.67 (talkcontribs)

Hey, I managed to fix the issue by adding $wgCookiePath = "/"; and $wgCookieSecure = false; to LocalSettings.php.

Thanks!