Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Routing Problem
  • Ive got a routing problem. '_root_' => 'frontend/public/index', // The default route
    '_404_' => 'frontend/public/404', // The main 404 route #
    Frontend
    ':lang/account/konto' => 'frontend/account/konto', <-- can find
    ':lang/account/bestellungen' => 'frontend/account/daten', <-- can find
    ':lang/account/logout' => 'frontend/account/logout', <-- can find
    ':lang/account/login' => 'frontend/account/login', <-- can find
    ':lang/account/registrierung' => 'frontend/account/registrierung', <-- can find ':lang/(:any)' => 'frontent/public/index', <-- cant find the controller
    ':lang' => 'frontent/public/index', <-- cant find the controller The controller exists with function action_index. I want that for example "de/group/article" should route to 'frontent/public/index'(frontend/public.php, function action_index). The controller:
    <?php
    class Controller_Frontend_Public extends Controller
    {
    private $_data = array(); public function before()
    {
    model_auth::setup(new model_db_kunde);
    $result = model_auth::check(); $this->_data = $result;
    } public function action_index()
    {
    $this->_data = View::forge('frontend/partials/login'); model_generator_preparer::initialize();
    $this->_data = model_generator_content::render();
    return Response::forge(View::forge('frontend/public',$this->_data));
    } public function action_404()
    {
    $this->response->status = 404;
    $this->response->body = View::forge('frontend/error');
    }
    } It always tells me:
    404 - Page not found!
    You can see this page because the URL you are accessing cannot be found. If i use another controller it works.
    I dont know anymore what to do.
  • I'm assuming the root & 404 work?
    '_root_' => 'frontend/public/index', // The default route
    '_404_' => 'frontend/public/404', // The main 404 route
    

    Find the differences for your non-working routes:
    ':lang/(:any)' => 'frontent/public/index', <-- cant find the controller
    ':lang' => 'frontent/public/index',
    
    Hint in case you can't find it: frontent & frontend. ;)
  • frontent !== frontend. Or is that a typo?
  • Oh , yes it was a typo. I couldnt see it! Thank you again!

Howdy, Stranger!

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

In this Discussion