php - Error 500 with Slim on "subfolder" -
i have index.php file in /api folder on server. , i'm beginning slim , i'm trying make rest api.
so in index.php i've got this:
$app->get('/', function() use ($db) { echo "get"; }); $app->post('/', function() use ($db) { echo "post"; }); $app->get('/test', function() use ($db) { echo "test"; });
and in .htaccess file, downloaded:
rewriteengine on # hosts may require use `rewritebase` directive. # if need use `rewritebase` directive, should # absolute physical path directory contains htaccess file. # # rewritebase / rewritecond %{request_filename} !-d rewritecond %{request_filename} !-f rewriterule ^ index.php [qsa,l]
if make call ../api/ i've got "get", post call works fine too, if make .../api/test call i've got 500 internal server error.
what doing wrong?
thank you!
Comments
Post a Comment