Skip to content
This repository has been archived by the owner on Apr 11, 2020. It is now read-only.

okko/Plack-Middleware-TrailingSlash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Plack-Middleware-TrailingSlash

Redirect to a path containing the trailing slash if the path looks like a directory

The Catalyst Perl MVC framework matches the requested URL to an action both with and without the trailing slash. For example both /company/contact and /company/contact/ go to the same action and same template.

This module redirects the requests without the trailing slash (ie. /company/contact) to the same URL with the trailing slash added (ie. /company/contact/).

Advantages:

  • relative links and references work reliably
  • search engines will not see duplicate content

Alternatives:

TODO:

  • Proper usage documentation (perldoc)
  • Publish in CPAN

About

Redirect to a path containing the trailing slash if the path looks like a directory

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages