A rack middleware to enforce appending or removing trailing slashes from URLs.
$ gem install rack-slashenforceIf you use Bundler, you will need to add it to your Gemfile.
gem 'rack-slashenforce', :require => 'rack'Add one of the following lines to config.ru:
To enforce a trailing slash on all urls without a period in them:
use Rack::AppendTrailingSlashTo enforce no trailing slashes on any urls:
use Rack::RemoveTrailingSlashesFor a more robust solution, see rack-rewrite.
Copyright (c) 2012 Tyler Kellen. See LICENSE for further details.