Link to home
Start Free TrialLog in
Avatar of jpchen
jpchen

asked on

Login Screen

I wan to use .htaccess to protect the directory but I don't link the pop-up login window.
Is any way I can use my login screen and still login to the protect directory?

thanks
Avatar of monas
monas
Flag of Lithuania image

I don't know about IE, but Netscape allows you to access http://login:password@www.example.com/path/to/page.html

but this URL will get to your Location bar, which is probably not what you want.

Possible solution:
1) make login screen you want;
2) get your login/password via your script; check if they are correct (you can not realy on www server for this)
3) generate page stating "you are allowed to get in" with <img src="http://login:password@your.site.com/protected/dir/img.jpg">

when user's browser will download image - browser will be told what login/password pair is for this are, so when it will access your documents from this area it will reuse password already known.

Drawbacks:
1) your user still will be asked for password if he'll follow link _BEFORE_ image will be received;
2) there will be user's logins/passwords in server log 'cos for images browsers uses GET method.
Avatar of jpchen
jpchen

ASKER

Look like that there is no other solution?
ASKER CERTIFIED SOLUTION
Avatar of joemacd
joemacd

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
Avatar of jpchen

ASKER

Hi,
  Look like is no other way right now.
Thanks for help.