you can use much simpler sollution without custom loader: `pattern /%presta_sitemap.sitemap_file_prefix%.{name}.{_format}`. Even Symfony 2.1 supports parameters in routes.