|
Hello list!
A few days back I came to you with a problem
concerning Embperl::Object not using Apache's DirectoryIndex directive. Gerald
Richter unfortunately informed me it is indeed a known issue and will be worked
on.
Just for reference, in case people may need this
here or there, here is a simple workaround:
In your template (base) file, use the following as
your _first_ line:
[- if ($ENV{REQUEST_URI}=~/\/$/) {
$http_headers_out{'Content-Type'} = 'text/html'; } -]
Then when you call your requested files, instead of
Execute('*'), use
if ($ENV{REQUEST_URI}=~/\/$/) {
Execute('index.html'); } else { Execute('*'); }
This will cause a request ending with a slash ( / )
to be served the file index.html (of course, this is to be changed to your
prefered index file).
Certainly, more sophisticated things can be
conceived, such as multiple index files (index.html, index.htm, index.pl, etc)
or even reading the DirectoryIndex directive off Apache itself (is this
possible? guess so...), but I only need this for my personal website, so I did
not bother with anything fancy, this quick fix did my job. Hope it helps someone
out there...
- Adrian.
|
- Re: DirectoryIndex file in Embperl::Object, a quick soluti... Adrian Ghizaru
- Re: DirectoryIndex file in Embperl::Object, a quick s... Cameron McBride
- Re: DirectoryIndex file in Embperl::Object, a qui... Adrian Ghizaru
