Rename Admin Paths (administration)

The purpose of this module is to secure drupal backend by overriding admin path.

Overview

This module allows you to:

  • rename path like '/admin/...' to '/something/...'
  • rename path like '/user/..' to '/something else/..'

It can be effective against registration spam bots or malicious people.

This small module just implements hook_outbound_alter and hook_inbound_alter to rename paths.
A settings form allows to choose replacement term for "admin" and "user".

Drupal 7

Version 7.x-2.x supports Overlay module, but you can get one 404 error only when enable/disable this module with overlay.

Drupal 6

If you are using Drupal 6, you can get the same feature by using the following code in your settings.php file.

function custom_url_rewrite_outbound(&$path, &$options, $original_path) {
    if (preg_match('|^admin(?![^/])(.*)|', $path, $matches)) {
        $path = 'backend'. $matches[1];
    }
}
 
function custom_url_rewrite_inbound(&$result, $path, $path_language) {
    if (preg_match('|^backend(?![^/])(.*)|', $path, $matches)) {
        $result = 'admin'. $matches[1];
    }
    if (preg_match('|^admin(?![^/])(.*)|', $path, $matches)) {
        $result = '404'. $matches[1];
    }
}

Credits

This module was developped at X-PRIME GROUPE, maintained 2 years at Makina Corpus and is now maintained at Acolad Développement.

Supporting organizations: 

Project Information

Downloads