[cgiapp] getting C::A::Dispatch to ignore certain URLs

P Kishor punkish at eidesis.org
Sun Jan 25 12:58:21 EST 2009


On 1/25/09, Matthew Whipple <mwhipple at kothartech.com> wrote:
> P Kishor wrote:
>
> >
> > Very well put. So, how do I make the webserver (in my case, Apache
> > without mod_perl, for now) serve directly anything under /img (or any
> > other specified folder) without invoking C::A::Dispatch?
> >
> > Many thanks in advance.
> >
> > Puneet.
> >
> >
>  Try moving the img directory out of the directory handled by dispatching
> and then accessing it through an Apache alias.
>
>


hmmm... I was hoping for a different solution. While the above is
doable, it messes up my mellow. My directory structure is thusly

<site folder>/
  - index.cgi
  - _perl/.. various Perl modules for this site
  - _tmpl/.. html templates
  - _logs/.. my own logs
  - css/.. stylesheets
  - js/.. javascripts
  - img/.. images and other media

All folders prefixed with '_' are *not* accessible directly via the
web, while the other folders, css, js and img contain stuff that can
be accessed through a URL. That way I can give some a direct URL to an
image in the img directory, for instance. This also allows me to keep
everything specific to a web application within its own folder. If I
move the img directory outside the <site folder>, I no longer have a
single folder for a single application.

A related question -- am I attempting something that is unusual? I
thought I was doing something very logical and reasonable, but then,
we always tend to think highly of our own strategies until we are
shown better ways.

Many thanks,

Puneet.


More information about the cgiapp mailing list