Routing for url working

Hi,

I am trying to figure out why my routing isn’t working. It seems to work for “landing” but not for “industries”. Have i missed a step? Thank you

c::set('routes', array(
    array(
        'pattern' => '(:any)',
        'action'  => function($uid) {
            $page = page($uid);
            if(!$page) $page = page('landing/' . $uid);
            if(!$page) $page = page('industries/' . $uid);
            if(!$page) $page = site()->errorPage();
            return site()->visit($page);
        }
    ),
    array(
        'pattern' => 'landing/(:any)',
        'action'  => function($uid) {
            go($uid);
        },
        'pattern' => 'industries/(:any)',
        'action'  => function($uid) {
            go($uid);
        },
    )
));```

You need to split landing and industries routes like that:

c::set('routes', array(
    array(
        'pattern' => '(:any)',
        'action'  => function($uid) {
            $page = page($uid);
            if(!$page) $page = page('landing/' . $uid);
            if(!$page) $page = page('industries/' . $uid);
            if(!$page) $page = site()->errorPage();
            return site()->visit($page);
        }
    ),
    array(
        'pattern' => 'landing/(:any)',
        'action'  => function($uid) {
            go($uid);
        }
    ),
    array(
        'pattern' => 'industries/(:any)',
        'action'  => function($uid) {
            go($uid);
        }
    )
));

Or merge landing and industries into one route, something like that:

array(
    'pattern' => '[landing|industries]+/(:any)',
    'action'  => function($uid) {
        go($uid);
    }
)

Also you can override page url with models (instead handle from routes)

Thank you so much