Zend Framework Routing: .html extension
This is the plugin I've used in several applications:
/**
* Removes .html extension from URI, if present.
*/
class Application_Plugin_RemoveHtmlExtension extends Zend_Controller_Plugin_Abstract
{
public function routeStartup(Zend_Controller_Request_Abstract $request)
{
// remove ".html" from the end of the URI
$url = preg_replace('#\.html$#i', '', $request->getRequestUri());
$request->setRequestUri($url);
}
}
A quick search on google yielded the following tutorials:
Extending Zend Framework Route and Router for custom routing
Routing and complex URLs in Zend Framework