Of course there is an easy solution. Symfony's factory architecture makes it easy to extend or modify built-in functionality. All you have to do is to change the routing class in factories.yml and prepare that class:
# class: sfPatternRouting
Create the class:
class myPatternRouting extends sfPatternRouting
protected function normalizeUrl($url)
$url = parent::normalizeUrl($url);
// remove trailing slash
$url = preg_replace('/\/$/', '', $url);
Okey, this is it.
But maybe it's a better way to catch the flow in an earlier point. Because this way, though routing will parse urls with trailing slashes fine, but calls to $request->getPathInfo() will still give the urls with the trailing slashes. It can has some unwanted side effects. It's better if the whole framework sees the request url as if it had no trailing slash.
What to do for that? Change the request class instead of the routing.
class myWebRequest extends sfWebRequest
public function getPathInfo()
$pathInfo = parent::getPathInfo();
// cut off trailing slash
$pathInfo = preg_replace('/\/$/', '', $pathInfo);