Hi, I'm newbie, this my first Phalcon projectm and it's small. For now I have only a couple pages, so I decided to put all actions in the IndexController. That's fine, but since I want the url to be:
https://127.0.0.1/statuts not: https://127.0.0.1/index/statuts
To solve this trouble, I had created app/config/router.php with this content:
use Phalcon\Mvc\Router;
// Create the router $router = new Router();
// Define statuts route $router->add( "/statuts", array( "controller" => "index", "action" => "statuts" ) );
$router->handle();
and adding this in the index.php:
/**
* Read routes
*/
include APP_PATH . "/app/config/router.php";
The try wasn't a success! So her is my first question. How can i hack the routing so i don't need to put the index as controller name on the uri.
Also, this do not show any image: {{ image("img/exemple.png", "alt": "alternative text") }} all the images are locate in public/img and i'm using nginx with this configuration :
location ~* ^/(css|img|js|flv|swf|download)/(.+)$ {
root /home/ibou/esaf/public;
}
Some help please