[Cppcms-users] url_dispatcher and routing
Brought to you by:
artyom-beilis
From: Andrew <an...@bu...> - 2011-04-25 23:19:27
|
Hi all, I am attempting to change the message board application to add m own app. what I would like is for my app to respond to urls that look like: /foobar/list/2 /foobar/item/3 to achieve this I have added the following: to mb::mb attach( new workflows(s), "foobar", "/foobar/{1}", "/foobar/((/.*)?)",1); to foobar::foobar dispatcher().assign("/list/(\\d+)",&workflows::prepare,this,1); dispatcher().assign("/item/(\\d+)",&workflows::prepare,this,1); unfortunately I am getting a not found error. Ive tried a range of different entries, but I do not seem to be able to solve the problem. Can anone provide some insight into how to configure this? also I am interested in how url_mapper works, the reference talks about how to use it, but doesn't exaplin exactly what it is for. thanks for any help :) - Andrew |