[Melbourne-pm] Dancer: index.html

Scott Penrose scottp at dd.com.au
Thu Jun 6 18:54:59 PDT 2013


Hi Perl Mongers

Anyone familiar with Dancer and public files?

In production, my public files are delivered by Apache, which means I can go to /fred/ and get actually /fred/index.html. But when I run in Dancer and go to /fred/ I have to specifically enter /fred/index.html.
I can easily add a rule for each of my directories, but that is a bit of a pain.

Is there any way to add configuration so public (static) content automatically looks for index.html?

Ta

Scott
P.S. If not, I guess it could be done with an even on the 404. ie if 404, try adding index.html to the end and retry.


More information about the Melbourne-pm mailing list