开发者

symfony routing problem

开发者 https://www.devze.com 2022-12-22 14:33 出处:网络
I have mp3 catalog portal and I want to customize my urls. I used url for downloading songs - /download/song/:song_id

I have mp3 catalog portal and I want to customize my urls. I used url for downloading songs - /download/song/:song_id But now I want url to look like /download/song:song_id - symfony doesn't recognize this pattern, :song_id parameter substitutes in url as is, so I get /download/song:son开发者_开发知识库g_id instead of f.e. /download/song14


Solved via adding empty separator_segment: options: { segment_separators: [/, ., -, ''] }

0

精彩评论

暂无评论...
验证码 换一张
取 消