php - Ajax route works offline, not on server + Silex -


i'm having problems ajax call on server. full routes.php file:

<?php $app->post('translations/get/trans', 'translations\controller\indexcontroller::ajaxgettagstranslations')->bind('translations.gettrans');  $app->get('/{_locale}/dashboard', 'dashboard\controller\indexcontroller::indexaction')->bind('dashboard.index');  $app->match('/api/todo/{user}/{accesskey}', 'api\controller\indexcontroller::todoaction')->method('post|get'); $app->match('/api/getdailymessage/{user}/{accesskey}', 'api\controller\indexcontroller::getdailymessageaction')->method('post|get'); $app->match('/api/todo/out', 'api\controller\indexcontroller::todooutaction')->method('post|get'); $app->match('/api/finisharea', 'api\controller\indexcontroller::finishareaaction')->method('post|get'); $app->match('/api/activity', 'api\controller\indexcontroller::activityaction')->method('post|get'); $app->match('/api/supplier', 'api\controller\indexcontroller::suppliersaction')->method('post|get'); $app->match('/api/translations', 'api\controller\indexcontroller::translationsaction')->method('post|get'); $app->match('/api/serverdatetime', 'api\controller\indexcontroller::serverdatetimeaction')->method('post|get'); $app->match('/api/dailymessage', 'api\controller\indexcontroller::dailymessageaction')->method('post|get'); $app->match('/api/settings', 'api\controller\indexcontroller::settingsaction')->method('post|get'); $app->match('/api/providedby', 'api\controller\indexcontroller::providedbyaction')->method('post|get'); $app->match('/api/presentations', 'api\controller\indexcontroller::presentationsaction')->method('post|get'); $app->match('/api/login', 'api\controller\indexcontroller::loginaction')->method('post|options|head|get');  $app->get('/{_locale}/hosts/list', 'hostess\controller\indexcontroller::listaction')->bind('hosts.list'); $app->match('/{_locale}/hosts/detail/{id}/{range}', 'hostess\controller\indexcontroller::detailaction')->method('get')->bind('hosts.detail'); $app->match('/{_locale}/hosts/edit/{id}', 'hostess\controller\indexcontroller::editaction')->method('get|post')->bind('hosts.edit'); $app->post('/hosts/gethosts', 'hostess\controller\indexcontroller::ajaxgethosts')->bind('hosts.gethosts');  $app->get('/{_locale}/segments/list', 'segments\controller\indexcontroller::listaction')->bind('segments.list'); $app->get('/{_locale}/segments/view/{id}', 'segments\controller\indexcontroller::viewaction')->bind('segments.view'); $app->match('/{_locale}/segments/edit/{id}', 'segments\controller\indexcontroller::editaction')->method('get|post')->bind('segments.edit'); $app->post('/segments/order', 'segments\controller\indexcontroller::ajaxupdateorderaction')->bind('segments.order'); $app->post('/segments/getsegments', 'segments\controller\indexcontroller::ajaxgetsegments')->bind('segments.getsegments');  $app->post('/segments/gethosts', 'segments\controller\indexcontroller::ajaxgethostssegment')->bind('segments.gethosts'); $app->post('/segments/updatehosts', 'segments\controller\indexcontroller::ajaxupdatehostssegment')->bind('segments.updatehosts');  $app->match('/{_locale}/subarea/edit/{segmentcode}/{deelgebied}', 'segments\controller\indexcontroller::editsubareaaction')->method('get|post')->bind('subarea.edit');  $app->get('/{_locale}/presentations/list', 'presentations\controller\indexcontroller::listaction')->bind('presentations.list'); $app->match('/{_locale}/presentations/upload', 'presentations\controller\indexcontroller::uploadaction')->method('get|post')->bind('presentations.upload'); $app->post('/presentations/deletepresentation', 'presentations\controller\indexcontroller::ajaxdeletepresentation')->bind('presentations.deletepresentation');  $app->match('/{_locale}/translations/list', 'translations\controller\indexcontroller::listaction')->method('get|post')->bind('translations.list'); $app->get('/translations/inserttrans', 'translations\controller\indexcontroller::inserttransjson')->bind('translations.inserttrans');  $app->match('/{_locale}/settings/list', 'settings\controller\indexcontroller::listaction')->method('get|post')->bind('settings.list');  $app->match('/{_locale}/history/index', 'history\controller\indexcontroller::indexaction')->method('get|post')->bind('history.index');  $app->get('/404', 'api\controller\indexcontroller::indexaction'); 

i'm having trouble first route. had first following: translations/gettrans didn't work. tried translations/get/trans didn't either. 404 error (not found). when check routing can find route:

enter image description here

but why not working?

long shot, have in .htaccess friendly urls? screwing it


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -