in reply to Catalyst - Add Trailing Slashes to URLs
package MyApp::Controller::Root; use strict; use warnings; use parent 'Catalyst::Controller'; __PACKAGE__->config->{ 'namespace' } = ''; sub auto : Private { my ( $self, $c ) = @_; if ( $c->request->path !~ m{/$} ) { $c->response->redirect( $c->request->path.'/' ); return 0; } return 1; }
I could have sworn there was a plugin out there to do this, but I can't seem to find it now...
In Section
Seekers of Perl Wisdom