Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
default routing unclear
  • 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.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion