I'm still struggling with handling requests like:
http://mysite.com/section/
where /section is under the control of a Perl content handler.
Directory indexes are off. I want to do exactly what apache
would do if /section did not have a PerlHandler. That is, I
want to search for valid index files (i.e. "index.html",
"default.html", and whatever else is specified in the config)
and then spit out that page.
I've tried tacking on "index.html" and running a subrequest
(which is obviously NOT what I want to do since I can't be sure
that "index.html" is a valid index name--it may be "home.html"
or "default.html", etc.), but even this doesn't work correctly.
It doesn't want to honor the content type. I'm doing something
like:
...
$uri .= 'index.html';
# /<dir>/ is now /<dir>/index.html
my($sr) = $r->lookup_uri($uri);
return $sr->run();
and it appears to work, but the headers I get are simply:
HTTP/1.0 200 OK
Date: Fri, 12 Nov 1999 00:25:44 GMT
No content type! I've tried explicitly setting $sr's content_type()
before I run() it and that doesn't work either.
I asked a similar question earlier and got no response, but I'm
getting desperate. Please help! :-}
-John