Link to home
Start Free TrialLog in
Avatar of epmo
epmo

asked on

.htaccess - database authentication

Hello - we have a website with cookies authentication and .htaccess file that protect videos.

The problem we have is that .htaccess cannot read the users from our database to see if they are valid users or not.

we have something like this for the htaccess file to read users from our database with the correct values, please any ideas? Thank you.

AuthGroupFile /dev/null
AuthName RESTRICTED
AuthType Basic
 
AuthMySQLHost
AuthMySQLDB
AuthMySQLUser
AuthMySQLPassword
AuthMySQLUserTable username
AuthMySQLNameField username
AuthMySQLPasswordField password
AuthMySQLCryptedPasswords Off
AuthMySQLScrambledPasswords Off
AuthMySQLKeepAlive on
 

<Limit GET POST>
 require valid-user
</Limit>
ASKER CERTIFIED SOLUTION
Avatar of JJSmith
JJSmith
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial

For a more specific mysql config try:

http://www.linuxhelp.net/guides/htaccessmysql/

Cheers
JJ

Note the:

AuthMySQLAuthoritative            On

in the link above.

Cheers
JJ
Avatar of epmo
epmo

ASKER

Thank you