Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question to htaccess

Status
Not open for further replies.

lukelukeluke

Technical User
Dec 23, 2003
117
CH
hi everyone.
i have protected a directory with htaccess. Lets say this: /root/secretdirectory
Now everytime i access this directory, there will be a little popupwindow where i can enter my username and password to see content.
Is it now possible to integrate this popup into a html site? For example put in /root/index.html a little form which looks like this:
_____________
Username: |_____________|
Password: |_____________|
______
|_Send_|

And then if i enter my htaccess username and password there, it will push me to /root/secretdirectory and not ask for the username/password in another popup but use the username/password from index.html instead? Is this possible?

Thanks for your ideas....
cheers, lucas
 
I'm trying to do the same type of thing. I want to send the login info from an asp page so as not to have users needing to use the ugly default popup login.

Have you found out how to do this?
 

FAQ faq65-1830 or Apache forum forum65 for more htaccess stuff.

asp password protection faq333-1030







Chris.

Indifference will be the downfall of mankind, but who cares?
 
You can do this but due to a recent IE update, I would not recommend it.

The way you do it with pure HTML/JS is to pass the info through using the URL in the following format:

Code:
[URL unfurl="true"]http://username:password@example.com[/URL]

The problem with IE is that a recent update broke this functionality, so any users with this update will get a broken link when they submit the form.

Hope this helps

Wullie


The pessimist complains about the wind. The optimist expects it to change. The leader adjusts the sails. - John Maxwell
 
thanks again for the feedbacks!
Well, user:password@domain is a bit too risky for me...
Everyone will see the password - a security leck anyway
which i wouldnt use...
But still looking for something like the idea from chris hirst.
The problem there is that i would have to use asp... ;)

I think about finding a solution with php later...

Thanks again for the answers!
greetings lucas
 
the asp solution was really for the second question poster in the thread (weaselthend)

but PHP or ASP solutions are really quite simple, as you can put your usernames and password into an included php/asp file with an array defined in it. Reasonably secure as no one can download the file without ftp access and the filename will not appear in the url anywhere. and you can just loop through the array to find the username.

Quick and Dirty but it does the job if you have no db capabilities



Chris.

Indifference will be the downfall of mankind, but who cares?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top