From: Nhân Lê Đ. <nh...@gm...> - 2014-12-19 13:22:41
Hi,
Seem CppCMS not support both slash and without slash automatically.
For example:
localhost/number/1 => work
localhost/number/1/ => not found
What is the best solution to deal with this problem?
I am currently add */ regex to all patterns.
From: Nhân Lê Đ. <nh...@gm...> - 2014-12-19 16:33:03
Hi,
Seem CppCMS not support both slash and without slash automatically.
For example:
localhost/number/1 => work
localhost/number/1/ => not found
What is the best solution to deal with this problem?
I am currently add */ regex to all patterns.
You forgot last slash with "?"
example:
dispatcher().assign("/number/(\\d+)/?",&page::number,this,1);
mapper().assign("number", "/number/{1}");
/number/(\\d+) - /number/1 found, /number/1/ not found
/number/(\\d+)/? - /number/1 found, /number/1/ found :)
From: Nhân Lê Đ. <nh...@gm...> - 2014-12-20 07:09:40
Hi Sergey,
Thank you for your correction, actually I mean /?
My question is we need to remember add this to all dispatch commands and no
implicit way, is it true?
Nhân Lê Đức <nhanava@...> writes:
>
>
> Hi Sergey,
> Thank you for your correction, actually I mean /?
> My question is we need to remember add this to all dispatch commands and no
implicit way, is it true?
>
Basically you need to know regex.