hook_menu_alter() with node URL alias I have a node with ID equal to 60, which has a URL alias that is "mynodes/about-us." I would like to change the access callback of that node to myfunction().

It doesn't work when I use the URL alias:

function celsis_forms_menu_alter(&amp;$items) {
    $items['mynodes/about-us']['access callback'] = myfunction;
}

function myfunction() {
     return FALSE;
}


But it works when I use the node number:

$items['node/60']['access callback'] = myfunction;


How can I get the url alias to work and would it be possible to change the access callback for all nodes with alias starting with mynodes/*?
You cannot do that because when Drupal invokes hook_menu() and hook_menu_alter() the value contained in $_GET['q'], which is used to find the menu callback to use, has been already changed from the path alias to the normal path.
drupal_path_initialize(), which is called by drupal_bootstrap() contains the following code:

  if (!empty($_GET['q'])) {
    $_GET['q'] = drupal_get_normal_path($_GET['q']);
  }
  else {
    $_GET['q'] = drupal_get_normal_path(variable_get('site_frontpage', 'node'));
  }


What you are trying to achieve can be accomplished in another way: implementing hook_node_access(). Differently from the equivalent hook in Drupal 6, it can be implemented also from modules that don't define a new content type.

function mymodule_node_access($node, $op, $account) {
  if ($op == 'view') {
    $path_alias = request_path();
    // ...
  }
}


$account contains the user object to which is being given access to the node. If the hook returns NODE_ACCESS_ALLOW, then the user has access to the node for the operation passed in $op; if the hook returns NODE_ACCESS_DENY, the user doesn't have access to the node; when it returns NODE_ACCESS_IGNORE, it leaves to other modules the decision.

request_path() returns the path alias if one was used. This means that if the user is using a URL like example.com/node/60, it returns "node/60"; if the user is using 
example.com/mynodes/about-us, which is an alias for example.com/node/60, it returns "mynodes/about-us." In the case the user is using example.com/index.php, the function returns an empty string.