thunders has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to find a way to give a user access to an Apache htaccess protected directory without giving them an idea of what the password to that directory is. I found some code to get a page from such a directory in the lwpcook documentation.
sub pass_isValid{ my $ua = LWP::UserAgent->new; my $req = HTTP::Request->new(POST =>'http://mysite.com/secure/test.h +tml'); $req->authorization_basic('htusername', 'htpassword'); print $ua->request($req)->as_string; }
But thats not really what I want. I'd like to do the authentication from a script, redirect the user, or provide a link to a file in that folder, and allow them to freely navigate to other files in that protected folder, without them ever seeing or the apache login screen
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: loggin into an Apache htprotected folder via CGI script.
by Aristotle (Chancellor) on Jun 27, 2002 at 17:54 UTC | |
|
Re: loggin into an Apache htprotected folder via CGI script.
by Zaxo (Archbishop) on Jun 28, 2002 at 04:54 UTC | |
|
Re: loggin into an Apache htprotected folder via CGI script.
by flocto (Pilgrim) on Jun 27, 2002 at 21:14 UTC | |
|
Re: loggin into an Apache htprotected folder via CGI script.
by atcroft (Abbot) on Jun 27, 2002 at 18:36 UTC | |
by thunders (Priest) on Jun 27, 2002 at 18:59 UTC |