--
PerlSetVar websrc_root /home/client
<Location /client>
SetHandler perl-script
PerlHandler ModPerl::Client
</Location>
relevant snippets from Client.pm
--
my $websrc = $r->dir_config('websrc_root')
or return fail($r, SERVER_ERROR,
"'websrc_root' not specified");
# use the path_info to determine which template file
to process
my $file = $r->path_info;
$file =~ s[^/][];
# Check for directories
my $full = "$websrc/templates/$file";
# If file is a directory, use index.html
if( -d $full ) {
if( substr($file, -1, 1) eq '/' ) {
$file .= 'index.html';
} else {
$file .= '/index.html';
}
}
$template->process($file, $params)
|| return fail($r, SERVER_ERROR,
$template->error());
Note: This is a simplified version of my logic, but
the problem is the same. I've checked and no matter
how I call the url (...ga/index.html, .../ga/,
.../ga), $file is always the same (zzx/ga/index.html)
when I call $template->process($file,$params) but the
relative link will vary. Also, does anyone have a
better way (or code) to do the DirectoryIndex in a
handler?
Thanks all....
__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/