Chapuzas - URLs bonitas
/post/86/show --> /post/esto-es-una-prueba-9/
urls en twig
{{ path('post_show', { 'id': entity.id, 'slug': entity.slug }) }}
controller action 1
@Route("/{id}/show", name="post_show2")
$this->redirect($this->generateUrl('post_show', array('id' => $entity->getID(),
'slug' => $entity->getSlug() )),301);
controller action 2
@Route("/{slug}-{id}/", requirements={"slug" = "[a-z0-9\-]+", "id" = "^\d+$"},
name="post_show")
layout
{% if canonical_url is defined %}
{% endif %}