Find all aliases for a given node I'm currently working with a client and running some scripts to generate reports (orphaned pages, etc). Right now, I need a way to get all possible registered aliases for a node. Right now, I'm using

$node = node_load($nid, NULL, TRUE);
$nurl = 'node/' . $nid;
$alias = drupal_get_path_alias($nurl);


I'm realizing, though, that the client has more than several pages where multiple aliases lead to the same node. Is there a function to retrieve an array of possible aliases?

Thanks!
You can do it with a database query

$aliases = db_query('
  SELECT alias
  FROM {url_alias}
  WHERE source = :source
', array(':source' =&gt; 'node/' . $nid))-&gt;fetchAll();


You may need to modify things a little if you have a multilingual site to take the language column into account.