Custom extension in url

Dear All,

I did not find any information on how to create custom extension url ini phalcon ?

for example :

http://ebmt.wm/api/PenerimaManfaatIndividu automatically translated to http://ebmt.wm/api/PenerimaManfaatIndividu.json

i'm newbie in mod_rewrite

Thank you for your help.

Kind Regards, Wildan

You could use Phalcons custom routes - http://docs.phalconphp.com/en/latest/reference/routing.html#usage-examples

http://example.com/api/Something to http://example.com/api/Something.json

$router->add("/api/:controller\.json", array(
    'module'      => 'api',
    'controller'  => 1,
    'file'        => 2
));

Thanks, it works!