FreeBeerReekingMonk has asked for the wisdom of the Perl Monks concerning the following question:
I found an apache rule to execute the cgi if it does not contain a dot in the name , everything with a dot is served directly by Apache, so it is not that slow... As I wanted to capture the name, instead of !\. I have ^(/^\.*)$ and the H= means that it treats this rewrite as a cgi script, the E adds a new variable to %ENV
RewriteRule ^(/[^\.]*)$ "C:/myapp/public/dispatch.cgi" [E=MYPATH_INFO:$1,H=cgi-script]
However, in app.pm, request->dispatch_path, a constant which can not be modified is always "/" while $ENV{PATH_INFO} and request->path do contain the right path. This means get "/" => sub{} is always running, even if we want to go to other pages.
By doing a get '/mypage' => $SUBROUTINE{'/mypage'} = sub {....} we can keep the plackup version working, and have the sub in a hash, to serve at / when this anomaly is detected. However, it has other problems, like the browser getting recursively redirected to /login/login/login...etc.. (code snippet will follow as soon as I have time to make a small selfcontained example).
So my question: Any monks successfully implemented Dancer2 applications under Apache on Windows?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Can not Dance on Windows
by Anonymous Monk on Dec 07, 2016 at 08:51 UTC | |
by Anonymous Monk on Dec 07, 2016 at 10:27 UTC | |
by Anonymous Monk on Dec 08, 2016 at 00:27 UTC |