28 Sep
2011
28 Sep
'11
7:33 p.m.
On Wed, Sep 28, 2011 at 9:22 PM, Assaf Gordon <gordon@cshl.edu> wrote:
I understand the apache configuration part, but not the dancer part:
In my Dancer/Template-Toolkit file (e.g. "views/layout/main.tt"), I'm still using: <img src="[% request.uri_base %]/images/pic.jpg"/> and <link rel="stylesheet" href="[% request.uri_base %]/css/style.css" />
So the link (inside the generated HTML that the user will receive) will contain: http://server.cshl.edu/images/pic.jpg and http://server.cshl.edu/css/style.css
Indeed that's what the users will get. Then they have to run another request to the server to retrieve it, and that's when they hit the Alias rule which tells the apache "they're asking for /images/ but they actually want /app/images".