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

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


On 17/12/2010 22:01, ambs wrote:
> Hello
>
> 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
> http://server/queryfile
>
> 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}" ?

OK, for this one, using request->base().
Now, need to find out what to do with the above problem.


More information about the Dancer-users mailing list