I have a problem when I want to run my first application with Slim on Mac operating system. I have configured .htaccess file like this:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
And I have configured in httpd.conf to load module rewrite, and I placed index.php in the same directory as .htaccess file.
This is my PHP code (I am using PHP 5.3)
<?php
require 'Slim/Slim.php';
$app = new Slim();
$app->get('hello/:name',function($name) {
echo 'Hello' .$name;
});
$app->run();
?>
When I run it in browser using http://localhost/slim/hello/test, I get the error 404.
What am I doing wrong?
i’m sory i get the solve problem , i don’t have
/character in my codei’m solve with this code