In a fresh installation of fuelphp, I see the following code
<code>
return array(
'_root_' => 'welcome/index', // The default route
'_404_' => 'welcome/404', // The main 404 route
'hello(/:name)?' => array('welcome/hello', 'name' => 'hello'),
);
</code>
While the first two (_root_ and _404_) are understandable, I am not able to understand the third route.
Docs here (http://docs.fuelphp.com/general/routing.html) does not explain this syntax.
I tried the urls below,
fuel.dev/public/ -> I get the greetings message that fuelphp is installed. (1st route) (OK)
fuel.dev/public/SOMEUNKNOWN_URL -> I get 404 message. (2st route) (OK)
But to get the third route, I tried the following urls but none of them worked.
fuel.dev/public/hello
fuel.dev/public/hello/myname
Can anyone explain me on this?
Yes, it does. It's called "Named routes and reverse routing".
There is something wrong with your setup, because you shouldn't have public in your URL. That might cause issues with rewriting too.
try fuel.dev/public/index.php/hello/myname, to bypass rewriting.