Does anybody know how I can change the administration setup to use a name thats not admin? At present if I turn on url aliasing then as soon as I click the administrator menu item it takes me to my ISP's control panel instead of the drupal system module.

Comments

sepeck’s picture

look at last comment in this thread for ideas
http://drupal.org/node/2476#comment-30525

-sp
---------
Test site...always start with a test site.
Drupal Best Practices Guide

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide

robertdouglass’s picture

You need a function like this (written here in pseudocode) in your sites.php file.


function conf_url_rewrite($path, $mode = 'incoming') {
  if ($mode == 'incoming' and $path starts with 'admin') {
    change $path to 'something else' plus rest of path.
  }
  else if ($mode == 'outgoing' and $path starts with 'something else') {
    change $path to 'admin' plus rest of path.
  }

  return $path;

}

- Robert Douglass

-----
If this helped you, please take the time to rate the value of this post: http://rate.affero.net/robertDouglass/

www.hornroller.com, www.robshouse.net

ezheidtmann’s picture

I believe you've got "incoming" and "outgoing" mixed up. This is the example in admin/help/path:

function conf_url_rewrite($path, $mode = 'incoming') {
  if ($mode == 'incoming') { // URL coming from a client
    return preg_replace('!^display/(\d+)$!', 'node/\1', $path);
  }
  else { // URL going out to a client
    $aliased = preg_replace('!^node/(\d+)$!', 'display/\1', $path);
    if ($aliased != $path) { return $aliased; }
  }
}
robertdouglass’s picture

Thanks clydefrog for the better example.

- Robert Douglass

-----
If this helped you, please take the time to rate the value of this post: http://rate.affero.net/robertDouglass/

www.hornroller.com, www.robshouse.net