The RdnTrailingSlash ZF2 module trims the trailing slash in a path and then redirects the request if it does not match an existing route.
-
Use
composer
to require theradnan/rdn-trailing-slash
package:$ composer require radnan/rdn-trailing-slash:1.*
-
Activate the module by including it in your
application.config.php
file:<?php return array( 'modules' => array( 'RdnTrailingSlash', // ... ), );
That's it! The module will take care of the rest.