2 * Implements hook_url_outbound_alter().
4 function {{ machine_name }}_url_outbound_alter(&$path, &$options, $original_path) {
5 // Use an external RSS feed rather than the Drupal one.
6 if ($path == 'rss.xml') {
7 $path = 'http://example.com/rss.xml';
8 $options['external'] = TRUE;
11 // Instead of pointing to user/[uid]/edit, point to user/me/edit.
12 if (preg_match('|^user/([0-9]*)/edit(/.*)?|', $path, $matches)) {
14 if ($user->uid == $matches[1]) {
15 $path = 'user/me/edit' . $matches[2];