autoredirect to path with trailing slash
Hello all, I have a lot of routers with trailing slash, but visitors can manually type them without trailing slashes. Is it possible to make simple autoredirect to the same path with trailing slash if current router does not exists and router with the same path plus trailing slash exists? Examples: /cv should be redirected to /cv/ /contacts to /contacts/ /about to /about/ etc... -- Best Regards, Nick Knutov http://knutov.com ICQ: 272873706 Voice: +7-904-84-23-130
On Thu, Mar 1, 2012 at 10:38 AM, Nick Knutov <mail@knutov.com> wrote:
Hello all,
Hey Nick! :) Is it possible to make simple autoredirect to the same path with trailing
slash if current router does not exists and router with the same path plus trailing slash exists?
This could probably do it very cleanly for you: https://metacpan.org/module/Plack::Middleware::Rewrite
participants (2)
-
Nick Knutov -
sawyer x