Me gustaría configurar el router de mi app para que:
localhost.test.php/prueba/
localhost.test.php/prueba/madrid
Donde local tendría que ser madrid tendría que ser una variable
Código PHP:
'router' => array(
// Uncomment below to add routes
'routes' => array(
'home' => array(
'type' => 'Literal',
'options' => array(
'route' => '/prueba/',
'defaults' => array(
'__NAMESPACE__' => 'Prueba\Controller',
'controller' => 'Prueba\Controller\Index',
'action' => 'index',
)
)
),
),
'may_terminate' => true,
'child_routes' => array(
'default' => array(
'type' => 'Segment',
'options' => array(
'route' => '/[:ciudad]',
'constraints' => array(
'act' => '[a-zA-Z0-9]+',
)
)
)
Código PHP:
<h1>A 404 error occurred</h1> <h2>Page not found.</h2> <p>The requested URL could not be matched by routing.</p> <h3>No Exception available</h3>
Muchas gracias,
Saludos