You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Wladimir Boton <wb...@hotmail.com> on 2003/03/07 01:12:53 UTC

shtml don´t get parsed with mod_perl protecting the directory

Hi,

I´m protecting a directory of my site with mod_perl, but all .shtml files 
inside it don´t get parsed by mod_include.

There are any way that shtml files get parsed?

thanks



_________________________________________________________________
MSN Hotmail, o maior webmail do Brasil.  http://www.hotmail.com


Re: shtml don´t get parsed with mod_perl protecting the directory

Posted by simran <si...@reflectit.com>.
You have to install a fixup handler to tell the server to parse them
again, i have the following in my config file:

-- in httpd.conf --
PerlFixupHandler +NetChant::Component::Handlers::shtmlFixupHandler

and my shtmlFixupHandler subroutine looks like:

####################################
#
# shtmlFixupHandler
#

=head2 shtmlFixupHandler

=over

=item Description

Enables you to have shtml files in areas where you might have other PerlHandlers installed. 

ie. Assuming you have the Includes option turned on for your virtual host/server, putting a 
    .shtml file in the 'auth' directory will not work as expected (aka, it will not get parsed). 
    This is because there is a PerlHandler already installed in that location which has an 
    associated "SetHandler perl-script" directive, and that directive takes precedence over
    all others. 

    To enable .shtml files to work in the /auth location for a virtual host put the following 
    configuration in your virtual host apache config file. 

    <Location /auth>
      Options +IncludesNOEXEC
      SetHandler perl-script
      PerlFixupHandler +NetChant::Component::Handlers::shtmlFixupHandler
    </Location>

=back

=cut

sub shtmlFixupHandler {
   my $request        = instance Apache::Request(shift);

   #
   #
   #
   $request->handler('server-parsed') if $request->filename =~ m/\.shtml$/;

   #
   #
   #
   return OK;
}






On Fri, 2003-03-07 at 11:12, Wladimir Boton wrote:
> Hi,
> 
> I´m protecting a directory of my site with mod_perl, but all .shtml files 
> inside it don´t get parsed by mod_include.
> 
> There are any way that shtml files get parsed?
> 
> thanks
> 
> 
> 
> _________________________________________________________________
> MSN Hotmail, o maior webmail do Brasil.  http://www.hotmail.com