Skip to content
This repository has been archived by the owner. It is now read-only.

itavero/RouterUnslashBundle

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

AMNL \ Router Unslash Bundle

Latest Stable Version Total Downloads

When I tested one of my websites with Nibbler it gave the following useful advice:

Adding or removing a trailing slash to all URLs of this site returns an error page (404). This is OK as no content is being duplicated, but visitors might try browsing to the pages of this website with or without a trailing slash. Ideally, the alternate URL should redirect to the correct page.

So I created this easy bundle that automates these kind of redirects.

Configuration

Below you will find the default configuration

# Router Unslash
amnl_router_unslash:
  permanent: false   # True = 301, False = 302
  public: true		 # Public cache?
  maxage: 1800       # Cache-Control max-age
  smaxage: 21600     # Cache-Control s-maxage

About

Symfony2 bundle that tries to find the right route if a visitor adds or forgets a slash in the URL

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages