I suggest that path search up the path tree for a url_alias I think the best was to explain is an example.

If I go to node/2/bob/jim the node/2 page will load. and in general this is what drupal does, drupal looks for /node/2/bob/jim, when it does not find it it looks for /node/2/bob when it does not find it it looks for /node/2.

but if a have a url alias story/funtimes that links to node/2 and the path /story/funtimes/bob/jim is presented it comes back with a 404. I think it should find node/2.

I have added this custom_url_rewrite_inbound to implement in on my site.

<?php
function custom_url_rewrite_inbound(&$result, $path, $path_language) {
  $result_terms         = explode("/",$result);
  $terms_count          = sizeof($result_terms);
  $current_terms_count  = $terms_count;
  while ($current_terms_count >0) {
    $path_terms = array_slice($result_terms,0,$current_terms_count);
    $path       = implode("/",$path_terms);
    if($path = drupal_lookup_path('source', $path)) {
      $extra_terms = array_slice($result_terms,$current_terms_count,   --> $terms_count);      
      $extra = implode("/",$extra_terms);
      $result = $path. "/".$extra;      $current_terms_count  = 0;    } 
    else {
      $current_terms_count --;
    }
  }
}
?>

This works fine, but I think that it makes sense for this to happen in the path module (maybe with regex in sql). It is normal drupal behavior to search up the path tree, and this allows params to be pass to pages that are using an alias.

If I am missing something, and this functionality already exists somewhere please set me straight (and point me in that direction). And if I can do anything to help have it added, please let me know.

Erik