I want to get a list of cities, where each city name is linked and refers a page for this city:
The links (created in the view script) look like this:
http://project.loc/catalog/Berlin (in the HTML source code url-encoded: Berlin)
http://project.loc/catalog/Erlangen (in the HTML source code url-encoded: Erlangen)
http://project.loc/catalog/Nürnberg (in the HTML source code url-encoded: N%C3%BCrnberg)
"Berlin", "Erlangen" etc. work, but if the city name contains a german special character (ä
, ö
, ü
, Ä
, Ö
, Ü
, or ß
) like "Nürnberg", a 404 error occurs:
A 404 error occurred Page not found. The requested URL could not be matched by routing. No Exception available
Why? And how to get this working?
Thanks in advance!
EDIT:
My router settings:
'router' => array(
'routes' => array(
'catalog' => array(
'type' => 'literal',
'options' => array(
'route' => '/catalog',
'defaults' => array(
'controller' => 'Catalog\Controller\Catalog',
'action' => 'list-cities',
),
),
'may_terminate' => true,
'child_routes' => array(
'city' => array(
'type' => 'segment',
'options' => array(
'route' => '/:city',
'constraints' => array(
'city' => '[a-zA-ZäöüÄÖÜß0-9_-]*',
),
'defaults' => array(
'controller' => 'Catalog\Controller\Catalog',
'action' => 'list-sports',
),
),
'may_terminate' => true,
'child_routes' => array(
// ...
),
),
),
),
),
),