Loading ...
Sorry, an error occurred while loading the content.
 

htaccess files

Expand Messages
  • John Michael
    Is it possible to configure an htaccess file to call a script using apache registry and use it in the PerlAccessHandler. I have written one pretty large perl
    Message 1 of 2 , May 29, 2003
      Is it possible to configure an htaccess file to call a script using apache registry and use it in the PerlAccessHandler.
      I have written one pretty large perl script in mod-perl using the apache registry to serve out picture gallery pages.  I would like to do some validation of my own on a per directory type basis.
       
      also
       
      I was trying to run this code to do some test and could only get it to work with the #pound signs in from of the files directives.
       
      It works like this.

      #<Files *>

      PerlAccessHandler 'sub {return Apache::Constants::FORBIDDEN;}' \

      #</Files>

      but I get this error in the log file.  I could not get it to work any other way.

      [Fri May 30 00:22:52 2003] [warn] Apache does not support line-end comments. Consider using quotes around argument: "#</Files>"

      Thanks in advance

      John Michael

       

    • Stas Bekman
      ... Certainly. Both the eagle and the modperl cookbook provide plenty of examples. .htaccess is not any different from a normal httpd.conf for this purpose.
      Message 2 of 2 , May 29, 2003
        John Michael wrote:
        > Is it possible to configure an htaccess file to call a script using
        > apache registry and use it in the PerlAccessHandler.
        > I have written one pretty large perl script in mod-perl using the apache
        > registry to serve out picture gallery pages. I would like to do some
        > validation of my own on a per directory type basis.

        Certainly. Both the eagle and the modperl cookbook provide plenty of examples.
        .htaccess is not any different from a normal httpd.conf for this purpose.

        > I was trying to run this code to do some test and could only get it to
        > work with the #pound signs in from of the files directives.
        >
        > It works like this.
        >
        > #<Files *>
        >
        > PerlAccessHandler 'sub {return Apache::Constants::FORBIDDEN;}' \
        >
        > #</Files>
        >
        > but I get this error in the log file. I could not get it to work any
        > other way.
        >
        > [Fri May 30 00:22:52 2003] [warn] Apache does not support line-end
        > comments. Consider using quotes around argument: "#</Files>"

        drop \ from the end of previous line since if you have it Apache reads it as:

        PerlAccessHandler 'sub {return Apache::Constants::FORBIDDEN;}' #</Files>

        __________________________________________________________________
        Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
        http://stason.org/ mod_perl Guide ---> http://perl.apache.org
        mailto:stas@... http://use.perl.org http://apacheweek.com
        http://modperlbook.org http://apache.org http://ticketmaster.com
      Your message has been successfully submitted and would be delivered to recipients shortly.