It might be easier to just use Apache::Htpasswd or the like, check
for the existence of the .htaccess file, and parse it accordingly to 
see if the user has permissions. Or you could have a database of who
has permissions to which files, and disallow access to any of the files
unless through magical_script.cgi . 


 [EMAIL PROTECTED] ([EMAIL PROTECTED]) was saying:

> Hi!
> 
> I have a program which is run under mod_perl as apache module.
> The program generates dynamic content from files in a directory tree.
> 
> I'm wondering would it be possible to use .htaccess auhtorization for
> this dynamic content?
> 
> for example:  
> 
> directory/file1
> directory/.htaccess
> /magical_script.cgi
> 
> 
> The magical_script.cgi gets called with parameter file=directory/file1.
> 
> I'd like to verify whether  the user has  access to directory/file1
> directly or not. (could he get it if he typed the url 
> http://server/directory/file1 or not)
> 
> Basically I think that this could be done by changing the request uri
> and calling all authorization related callbacks.  However I have no
> idea how to do that. Even less with mod_perl.
> 
> Do you think that this would be possible?  
> 
> -- 
>   Osmo Paananen <[EMAIL PROTECTED]>        
> 

-- 
[EMAIL PROTECTED] 
"With pain comes clarity."


Reply via email to