How do you route an entry or category URI to a plugin controller? Craft's documentation states: "If the URI matches an entry’s or category’s URI, the section’s/category group’s template will get loaded".  Instead of loading the template, how can I set the route to run an action instead?  In config/routes.php, I set 'entryurl' => array('action' => 'action/path'), but this does not work.
You want to take a look at the registerSiteRoutes() method in your plugin class. In this example, it will route a request to your MyPluginHandle_FooController::actionBar() method. foo is obviously the name of the controller, and bar is the method.

public function registerSiteRoutes()
{
    return array(
        'some/route/here' =&gt; array('action' =&gt; 'myPluginHandle/foo/bar'),
    );
}


Here is what the controller would look like with these naming conventions:

&lt;?php
namespace

class MyPluginHandle_FooController extends BaseController
{
    // Allow anonymous users (users that aren't logged in) to use this controller
    protected $allowAnonymous = true;

    public function actionBar()
    {
        // do something
    }
}


You can also do the same thing for CP routes.

http://buildwithcraft.com/docs/plugins/templates#dynamic-url-routing