Q: Wordpress URI hook "before post search" I'm trying to write a wordpress plugin that searches allows for the "third segment" of the URI   to be a parameter.
So for example my pretty links structure looks like: %category%/%postname%
I've got a category for "myplugin" and a post called "myitem"
this would be accessible via: /myplugin/myitem
I need to be able to add a third parameter: /myplugin/myitem/the_item_identifier
Within the hook I'll have some logic to handle this case, something like 
function myplugin_hook_before_uri_read(){
    $fields = explode('/',$_SERVER["REQUEST_URI"]);
        if (count($fields) == 4 && $fields[1] == "myplugin" && $fields[2] == "myitem") {
            // fix things so we're redirected into the correct post.
    }
}

to be fair, I could probably manage the same effect by using the URI
     /myplugin/myitem/?the_item_identifier
So maybe it's not the end of the world.  Though I'd feel a lot cleaner if I could work without the ?
Also - if there's a better way then adding a hook, please speak up about that.  I'm not married to the method, it's just the only way I can think to achieve it.
EDIT in response to Chris' question below, 
in this case, the_item_identifier is the primary key from a third party XML document.
So for example, if it was a list of products,  I'd have a single post that was a "display template" for the product.

A: What do you plan to use for "the_item_identifier"? There is already an option built into the wordpress dashboard that allows you to make custom permalinks. I often use:
/%year%/%monthnum%/%day%/%postname%/
Check out the WordPress Permalinks page for a list of options to use between the %% to make your custom permalink structure.
