6
Hello folks I’m having trouble using the Slim framework... when I try to access via get the root "/" I can normal, but when I try to access other methods like "/hello" it simply n goes, error " Not Found
The requested URL /slim/clients was not found on this server." not even with the demo this error persists follows my code ...
<?php
require 'Slim/Slim.php';
\Slim\Slim::registerAutoloader();
$app = new \Slim\Slim();
$app->response()->header('Content-Type', 'application/json;charset=utf-8');
$app->get('/', function () {
echo "SlimProdutos";
});
$app->get('/hello', function (){
echo "Ola";
});
$app->run();
?>
follows the . htaccess
RewriteEngine On
#RewriteBase /var/www/slim
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
Let your
htaccess
similar to Slim’s, and put in Rewritebase the name of the folder you placed itRewriteBase /slim/
. Let me know the result.– KaduAmaral
Did Guilherme manage to solve?? I also have the same problem.
– Tiago Amaral