[dancer-users] query parameter parsing and Dancer vs Apache handling

Amelia Ireland aireland at lbl.gov
Mon May 15 18:40:46 BST 2017


Hi Dancers,

Is it possible to have Dancer selectively handle some routes based on query
parameters, and leave others for another script to handle?

I'm working with an old site where some URLs with query params of the form

main.cgi?param=value&param2=value2&param3=value3

can be handled by Dancer (by redirecting to new pages), but others must be
handled by the old site.

At present, I have a route set up to parse query params for /main.cgi, and
any query params that Dancer can't handle go to the 404 page. Is there are
way to let those queries 'pass through' dancer (i.e. not trigger a 404) and
be handled by the perl script main.cgi instead? If I set up Apache or my
psgi application to send all those queries to main.cgi first, the subset of
pages that can be redirected by new pages will just show the old page.
Unfortunately I cannot change the content of the old pages to change the
URLs.

I'd guess I can create Apache redirects for sets of query parameters --
it's pretty easy to specify that only certain combinations of query params
are handled by Dancer, and I'm not sure it is as easy a task with Apache.

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20170515/eab1f80b/attachment.html>


More information about the dancer-users mailing list