Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: ModPerl
Re: robots.txt with httpd and root level SetHandler perl-script
 

Index | Next | Previous | View Flat


torsten.foertsch at gmx

Mar 14, 2011, 7:34 AM


Views: 1105
Permalink
Re: robots.txt with httpd and root level SetHandler perl-script [In reply to]

On Monday, March 14, 2011 14:53:35 André Warnier wrote:
> > I'd like to have a robots.txt on a site that has the following apache
> >
> > httpd config:
> >
> > <Location />
> > SetHandler perl-script
> > PerlHandler RT::Mason
> > </Location>
> >
> >
> > But if I install a robots.txt to the DocumentRoot and test it via wget I
> > just download the front page of the site, as its handled by perl-script.
> > It it possible to have a robots.txt in this situation?
> >
> >
> >
> > thanks for any tips, Andy.
> >
> >
>
> Ideas :
> 1) Try a <FilesMatch ^robots\.txt$> section inside the above section, to
> reset the handler to the default Apache (that may not be so easy)

SetHandler None (imho)

> 2) Create a Mason handler to handle the URL "robots.txt" and return the
> file "as is"

or instead of the Location block:

PerlMapToStorageHandler "sub { \
use Apache2::Const -compile=>DECLINED; \
use Apache2::RequestRec (); \
use Apache2::RequestUtil (); \
unless( $_[0]->uri eq '/robots.txt' ) { \
$_[0]->add_config(['SetHandler perl-script', \
'PerlHandler RT::Mason']); \
} \
return Apache2::Const::DECLINED; \
}"

Torsten Förtsch

--
Need professional modperl support? Hire me! (http://foertsch.name)

Like fantasy? http://kabatinte.net

Subject User Time
robots.txt with httpd and root level SetHandler perl-script a.smith at ukgrid Mar 14, 2011, 5:09 AM
    Re: robots.txt with httpd and root level SetHandler perl-script aw at ice-sa Mar 14, 2011, 6:53 AM
        Re: robots.txt with httpd and root level SetHandler perl-script randolf at modperl Mar 14, 2011, 7:28 AM
        Re: robots.txt with httpd and root level SetHandler perl-script torsten.foertsch at gmx Mar 14, 2011, 7:34 AM
            Re: robots.txt with httpd and root level SetHandler perl-script a.smith at ukgrid Mar 14, 2011, 10:45 AM
    Re: robots.txt with httpd and root level SetHandler perl-script torsten.foertsch at gmx Mar 14, 2011, 11:03 AM
        Re: robots.txt with httpd and root level SetHandler perl-script a.smith at ukgrid Mar 14, 2011, 11:14 AM
    Re: robots.txt with httpd and root level SetHandler perl-script torsten.foertsch at gmx Mar 14, 2011, 11:39 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.