# solution1 $app->routes->get('/public/*sr')->to(cb => sub { my $self = shift; $self->res->code(301); $self->redirect_to($self->stash('sr')); }); # solution2 $app->routes->get('/public/*sr')->to(cb => sub { my $self = shift; $self->render_static($self->stash('sr')); });