Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: (nrd) Changing the address line/location bar

by newrisedesigns (Curate)
on Feb 28, 2003 at 18:21 UTC ( #239501=note: print w/replies, xml ) Need Help??


in reply to Changing the address line/location bar

Obscurity does not equal security.

Use Apache's basic authentication, or a CGI script.

#Psuedo Code my $q = CGI->new(); if($q->param("password") eq "my password"){ my $base_dir = '../secure_docs/'; my $requested_file = $q->param("file") || ''; if($requested_file =~ /(\w+)/){ $requested_file = $1 . '.html'; } else{ exit; } my file = $base_dir . $requested_file; if(-e $file){ open($fh, $file); print while <$fh>; close $fh; } } else{ exit; } # of course, there are other/better ways...

Hope this helps.

John J Reiser
newrisedesigns.com