
Kanji
User
Jun 15, 2000, 8:48 AM
Post #3 of 3
(276 views)
|
|
Re: RE: passwords and security
[In reply to]
|
Can't Post
|
|
If you couple .htaccess with a CGI that pretends to be a directory, you could do something like ... <BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">code:</font><HR> # Proper security measures and # error handling left as an # exercise for the reader. :-) my $files = "/path/to/user/files"; my $user = $ENV{'REMOTE_USER'}; my $path = $ENV{'PATH_INFO'}; if ( open( FILE, "$files/$user/$path" ) ) { print "Content-Type: text/html\n\n", <FILE>; } else { die "Couldn't open $user/$path: $!"; }</pre><HR></BLOCKQUOTE> Anyhoo, that's a very simplistic example, but should seed some ideas. Alternately, you can take a look at mod_rewrite, but you should seek an Apache forum for more assistance with that.
|