[Dancer-users] Deploying with fcgid under a specific directory

ambs ambs+dancer at perl-hackers.net
Fri Dec 17 23:01:42 CET 2010


I am deploying dancer in a directory, like  http://server/query instead 
the root path.

This is my redirect configuration:

     RewriteEngine On
     RewriteCond %{REQUEST_FILENAME} !-f
     RewriteRule ^/query(.*)$ /query/dispatch.fcgi$1 [QSA,L]

While the main page works, when I use
   <% request.base %>file
in a template, it gets

I tried to solve this, using <% request.base %>/file, but then it gets 
as http://server//file when testing with bin/app.pl

What am I doing wrong?

Also, when using "redirect /" in Dancer code, should I use "redirect 
/query" instead? Or "redirect request->{base}" ?

Thank you

More information about the Dancer-users mailing list