[Dancer-users] Dancer, Plack, plain old CGI and mod_rewrite

icovnik icovnik at gmail.com
Thu Mar 11 12:05:53 CET 2010


On Thu, Mar 11, 2010 at 9:29 AM, Alexis Sukrieh <sukria at sukria.net> wrote:
[ cut ]
>        RewriteEngine On
>        RewriteCond %{REQUEST_FILENAME} !-f
>        RewriteRule /App1(.*)$ /App1/public/dispatch.cgi$1 [QSA,L]
>        RewriteRule /App2(.*)$ /App2/public/dispatch.fcgi$1 [QSA,L]
[cut]
> This works perfectly well on my box, it should work on yours ;)

Yes perfect! That's the thing I wanted. Thank you.

Just one more thing (probably more about Apache than about Dancer).
Currently the URI

http://server/App1/public/dispatch.cgi/foo/bar

is catched by script /App1/public/dispatch.cgi. In dispatch.cgi it is
matched by rule

get '/foo/:par' => sub { ... };

I just wonder whether is it possible to get rid of that "dispatch.cgi"
part in URI? To make the same functionality but with URIs like this:

http://server/App1/public/foo/bar

e.g. to completely hide the script name from outside.

Thank you.

ico


More information about the Dancer-users mailing list