How can i put it in my index bootstrap file?
Here is my index.php
//some more code above this line....
//Setup a base URI so that all generated URIs include the "tutorial" folder
$di->set('url', function() {
$url = new \Phalcon\Mvc\Url();
//$url->setBaseUri('/'); para uso produção
$url->setBaseUri('/link2me/'); //para uso local
return $url;
});
if ($_SERVER["SERVER_NAME"] == 'l-2.me') {
$router = new Phalcon\Mvc\Router();
$router->add(
'/s/{[a-z0-9]+}',
array(
'controller' => 'index',
'action'=> 'search'
));
$router->handle();
}
//Handle the request
$application = new \Phalcon\Mvc\Application($di);
echo $application->handle()->getContent();
But when i try to open the url i got the following: Phalcon Error:. SController handler class cannot be loaded