zendframework/zf-web — pull request #85 by weierophinney (2014-12-17 15:04:45+00:00)
Title: Redirects/canonical to latest versions

Link building to documentation is currently broken because docs have the version number of the framework in the url:

* `http://foo/bar/2.0/page.html`
* `http://foo/bar/2.1/page.html`

While this is great to be able to have documentation relative to the specific version of zf in use, it's also a big problem, because we are basically breaking search results/query on Google.

My solution involves shameless stealing of ideas from the Symfony folks, who did great work on this. They basically redirect the users to a fixed URL for the latest version:

* `http://symfony.com/doc/2.0/book/doctrine.html` - stays
* `http://symfony.com/doc/2.1/book/doctrine.html` -> redirects to `http://symfony.com/doc/current/book/doctrine.html`

Also, a warning should be displayed for older doc versions, and a `` should be rendered, always pointing to the latest version of the page.

This may look like pointless SEO optimization, but if this is not happening soon, searching for docs may become a mess very quickly :)

Ping @Freeaqingme @robertbasic @ezimuel