Page 1 of 1

SEF breaks basic authentication

Posted: Sat May 26, 2018 7:17 pm
by bulgin
Joomla 3.8.8 on Centos 7 on WHM/Cpanel

When applying basic authentication to the administrator directory (of course I'm using ssl), together with Search Engine Friendly links, it breaks and doesn't work when attempting to login into the joomla backend.

If I remove SEF from the configuration it works.

Anyone know why this would happen and how it can be fixed.

I believe it may have something to do with dotted (.htaccess) files but could be wrong.

any help much appreciated.

Re: SEF breaks basic authentication

Posted: Sat May 26, 2018 7:25 pm
by toivo
SEF links in /administrator or did I misinterpret the description of the issue?

Basic authentication - do you mean at the level of the operating system?

Any error messages or entries in the PHP error log?

Re: SEF breaks basic authentication

Posted: Sat May 26, 2018 11:46 pm
by bulgin
Sorry I should have been more clear - this is what they call basic authentication. Yes, at the level of operating system. I "password protect" the administrator directory to keep the install safe and it does a good job of that generally. In a Cpanel/WHM install you can use a feature called "directory privacy" which just install the necessary files for standard apache basic authentication. See the image attached for what it looks like when it's working.

There are no errors in apache logs other than 404 errors for this call.

As noted, this problem goes away if I turn off SEF links in the joomla configuration.

I'm normally operating with SEF links and .htaccess.
basic auth.jpg

Re: SEF breaks basic authentication

Posted: Sun May 27, 2018 6:37 am
by toivo
Password protecting the administrator directory is, or should be, totally separate from SEF at the front end. It sounds as if the cPanel/WHM feature for "directory privacy" somehow interferes with the front end.

It is possible to set up password protection in Apache by following these instructions: http://httpd.apache.org/docs/current/ho ... gitworking

The free Admin Tools extension of Akeeba has the same option and it just works: https://www.akeebabackup.com/documentat ... ction.html

Re: SEF breaks basic authentication

Posted: Mon Feb 25, 2019 1:36 am
by bulgin
Thank you. I discovered 2 factor in joomla and that solves everything.