Skip to content

Instantly share code, notes, and snippets.

@weierophinney
Created November 17, 2011 19:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save weierophinney/1374245 to your computer and use it in GitHub Desktop.
Save weierophinney/1374245 to your computer and use it in GitHub Desktop.
<?php
array(
'default' => array(
'type' => 'Segment',
'options' => array(
'route' => '/[:controller[/:action]]',
'constraints' => array(
'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
),
'defaults' => array(
'controller' => 'index',
'action' => 'index',
'format' => 'html',
)
'may_terminate' => true,
'child_routes' => array(
'format' => array(
'type' => 'Segment',
'options' => array(
'route' => '[.:format]',
'constraints' => array(
'format' => '(json|html)',
),
'defaults' => array(
'format' => 'html',
)
),
),
),
),
),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment