0
나는 URI의 포맷 단일 경로 패턴을Symfony2 라우팅 경로/패턴
1 hello/first.format
2 hello/first
3 hello/first/last.format
4 hello/first/last
첫이 필요
및 마지막 및 을 사용하여 다음과 같은 구성하고자는 선택적 매개 변수와 형식을 선택.
hello-route:
pattern: /hello/{fist_name}/{last_name}.{_format}
defaults: { _controller: AcmeHelloBundle:Default:index, last_name:Default, _format:html}
requirements:
_format: html|rss|json
first_name: \w+
last_name: \w+
하지만, 3을 2 일치로 정확하지 않은, 4 아니지만 1. 1은 실패하지 않습니다,하지만 먼저 "로 {FIRST_NAME} 일치합니다 :
이
내가 시도 것입니다 .format "필요성에도 불구하고.기본 라우팅을 사용하여 어떻게 할 수 있습니까?