You are here

README.txt in Rename Admin Paths 7.2

Same filename and directory in other branches
  1. 8.2 README.txt
  2. 8 README.txt
  3. 7 README.txt
README.txt
==========
The purpose of this module is to secure drupal backend by overriding admin path.
It's will rename path like '/admin/...' to '/something/...' or path '/user/..' 
to '/something else/..'. This module can be effective against registration spam 
bots or malicious people.
It's just implements hook_outbound_alter and hook_inbound_alter to rename paths.


Installation
------------
1. Install this module like any other Drupal module (place it in the
modules directory for your site and enable it on the `admin/build/modules` page.
2. Go to admin/config/user-interface/rename-admin-paths and configure how to 
override admin paths.
3. Clear your cache

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(/{0,1}.*)|', $path, $matches)) {
        $path = 'backend'. $matches[1];
    }
}

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

File

README.txt
View source
  1. README.txt
  2. ==========
  3. The purpose of this module is to secure drupal backend by overriding admin path.
  4. It's will rename path like '/admin/...' to '/something/...' or path '/user/..'
  5. to '/something else/..'. This module can be effective against registration spam
  6. bots or malicious people.
  7. It's just implements hook_outbound_alter and hook_inbound_alter to rename paths.
  8. Installation
  9. ------------
  10. 1. Install this module like any other Drupal module (place it in the
  11. modules directory for your site and enable it on the `admin/build/modules` page.
  12. 2. Go to admin/config/user-interface/rename-admin-paths and configure how to
  13. override admin paths.
  14. 3. Clear your cache
  15. Drupal 6
  16. --------
  17. If you are using Drupal 6, you can get the same feature by using the following
  18. code in your settings.php file.
  19. function custom_url_rewrite_outbound(&$path, &$options, $original_path) {
  20. if (preg_match('|^admin(/{0,1}.*)|', $path, $matches)) {
  21. $path = 'backend'. $matches[1];
  22. }
  23. }
  24. function custom_url_rewrite_inbound(&$result, $path, $path_language) {
  25. if (preg_match('|^backend(/{0,1}.*)|', $path, $matches)) {
  26. $result = 'admin'. $matches[1];
  27. }
  28. if (preg_match('|^admin(/{0,1}.*)|', $path, $matches)) {
  29. $result = '404'. $matches[1];
  30. }
  31. }