get '/wedds' => sub { shift->redirect_to('/wedds/index.html') }; get '/wedds/(*static_file)' => { static_file => 'index.html' } => sub { my $self = shift; my $static_file = $self->param('static_file'); my $static = Mojolicious::Static->new; $static->root($self->app->home->rel_dir($conf->{static_html})); $static->serve($self, "$static_file"); $self->rendered; return 1; };