0

Is it possible to have the administration pages on a different place than /admin?

so something like: www.mysite.com/someotheradminlocation

I don't want the admin location to be guessable by hackers.

4
  • 2
    Knowing the URL for the administration pages is not a security issue in itself, and it should never be.
    – avpaderno
    Commented Mar 3, 2013 at 10:09
  • 1
    Security through obscurity is a waste of time, you should concentrate your efforts elsewhere. Enforce a strong password policy for administrators and make sure your permissions are set up correctly, keep up to date with security updates for core and contrib modules, etc
    – Clive
    Commented Mar 3, 2013 at 11:24
  • You can look at using two factor authentications to make log in more secure
    – GoodSp33d
    Commented Mar 3, 2013 at 14:56
  • I was just looking for an additional security method. After the site has been 'hacked'/'defaced' for 2 times in 2 month, I thought having the admin page hidden might add to making it more secure.
    – Toad
    Commented Mar 4, 2013 at 19:41

2 Answers 2

2

This should be very easy. It's under Site building > URL aliases > Add alias (admin/build/path/add) You can add a new URL alias there.

So if you can't find it you might need to install the pathauto module

solution 2

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];
    }
}
3
  • 1
    But by using outbound function will it not change admin -> new admin path and yet still allow a user to access new admin page when you type in admin ?
    – GoodSp33d
    Commented Mar 3, 2013 at 15:00
  • The preferred solution should make the admin path unguessable.
    – Toad
    Commented Mar 4, 2013 at 19:40
  • 1
    The "solution 2" makes sense to me. @Toad, just replace "backend" with your unguessable string and it should work.
    – greggles
    Commented Mar 12, 2013 at 1:05
3

There is a module to do what monymirza suggested - http://drupal.org/project/rename_admin_paths

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

4
  • This module is only for D7, OP tagged the question with D6.
    – niksmac
    Commented Mar 12, 2013 at 1:25
  • Good point, Nikhil, though the project page does give some advice for Drupal 6.
    – greggles
    Commented Mar 12, 2013 at 13:12
  • Now i forgot the admin URL i used and how can i retrieve it via db? Or any other way
    – harikris
    Commented May 30 at 13:04
  • @harikris that should be posted in the issue queue as a documentation question.
    – greggles
    Commented Jun 10 at 13:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.