Skip to content

Instantly share code, notes, and snippets.

@tedkulp
Created January 21, 2009 16:53
Show Gist options
  • Save tedkulp/50036 to your computer and use it in GitHub Desktop.
Save tedkulp/50036 to your computer and use it in GitHub Desktop.
<?php
//Automatically add some component routes -- see docs for details
//SilkRoute::build_default_component_routes();
SilkRoute::register_route("/admin/:controller/:action/:id", array("component" => 'admin'));
SilkRoute::register_route("/admin/:controller/:action", array("id" => '', "component" => 'admin'));
SilkRoute::register_route("/admin/:controller", array("id" => '', 'action' => 'index', "component" => 'admin'));
//Catch-all goes here
SilkRoute::register_route_callback("*", array("CmsRoute", "run"), array());
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment