Quote:
> Dear perl admins and programmers,
> after writing some perl programs to be used as cgi-bin from an Apache Web
> Server, we were asked to protect some URLs through Apache Authorization
> depending on the QUERY_STRING value. Do you know whether it is possible
> either through Apache configuration or Perl ?
So long as Apache is configured to require a valid user you can have
your script throw a 401 error is the user in question is not allowed
to access the data.
This has nothing do with Perl and would better have been asked in a
group relating to CGI programming.
In Perl the impelementation would look something like:
unless ( is_allowed(remote_user)) {
print header({status=>401,'WWW-Authenticate' =>"Basic realm=\"Whatever\""});
exit;
Quote:
}
> Our problem arises from the fact that the <Location> directive of Apache
> conf file only grabs the URL, not its parameters.
> Any suggestions ?
If I were you I'd stop using QUERY_STRING and start using PATH_INFO
for these parameters. This of course has nothing to do with Perl.
Oh, and please stop spamming. Post your question once. Crosspost if
appropriate. Never post separately to two or more groups unless you
have a overwhelmingly strong reason to do so. "I forgot to crosspost"
is _not_ an overwhelmingly strong reason.
--
\\ ( )
. _\\__[oo
. l___\\
# ll l\\
###LL LL\\