[thelist] link to a password protected directory

Bob Haroche spambait at onpointsolutions.com
Thu Jul 11 11:21:03 CDT 2002


> How can I pass my username and password within a link to access a password
protected directory, so that the browser does not pop up a message box.

Assuming an Apache server you can typically use this syntax:

http://username:password@www.domain.com/protected/directory

where username and password are the same as created using .htaccess.

A security issue is that this URL remains in the browser's history/cache, so
someone else on that computer could access the protected pages without
having to know the login name and password.

If you're interested I have a javascript that takes the name/password fields
from a login form and re-writes them into this syntax.

Regards,
Bob Haroche
O n P o i n t  S o l u t i o n s
www.OnPointSolutions.com




More information about the thelist mailing list