Hi,

Is there an elegant way to change the URL of the /admin menu? My problem is that my hosts have setup my hosting admin panel on /admin so when I click on "admin" in drupal, I get taken to my hosting admin panel! I need my drupal installation in my root directory.

I know I can change path settings in the Drupal menu but I'm worried that the /admin path is hard-coded into a lot of modules.

Is there anything I can do?

I have asked my hosts and they've said "sorry, we can't help you - you've got to change the settings on Drupal"

Thanks,
Jack

Comments

dan_aka_jack’s picture

Humpf... an .htaccess redirect doesn't work. I think my web host must be setup to grab the /admin request before it gets anywhere near my actual directory.

Jack Kelly
UKfilm.org - Advice, Discussion and News for the UK filmmaker

dan_aka_jack’s picture

OK, so I've found that I can get to my admin section by using ugly URLs (i.e. index.php?q=admin). But I don't want to disable clean URLs for the whole site. Is there any way to disable clean URLs for just the admin menu item?!? Alternatively, is there a way to hack Drupal so the Admin menu item links to index.php?q=admin whilst keeping the "drupal path" as /admin ?

Jack Kelly
UKfilm.org - Advice, Discussion and News for the UK filmmaker

dan_aka_jack’s picture

OK, we've fixed the /admin problem by setting up a URL alias.

But I can't figure out how to fix an associated problem: when users sign up, they get an email which tells them to log in at /user . For some reason, /user redirects people to my hosting admin panel! Does anyone understand why??? Does Drupal re-direct /user to /admin for some reason?

Jack Kelly
UKfilm.org - Advice, Discussion and News for the UK filmmaker

dan_aka_jack’s picture

OK, it's all fixed now. I've used URL alias to fix the /user problem too.

Jack Kelly
UKfilm.org - Advice, Discussion and News for the UK filmmaker

robiw’s picture

Have the same problem as outlined above with admin dir.

Unforturnately, url alias only works for the administer link in the admin menu. The other menu items still point to /admin/ and invoke our hosting admin panel not the drupal link.

Thought I saw something about admin path being able to be specified in 4.7 which might overcome the problem or be separated from standard site but can't seem to find it again.

Wouldn't be a problem to have public site and admin in a sub-dir. Is it possible?

Have installed 4.7 beta-5 but see no options anywhere; maybe was dreaming. If anyone can shed some light it would be appreciated as would prefer not to install in sub-dir.

Rob Willox

dan_aka_jack’s picture

Hi Rob,

It sounds like your hosting admin panel is more of a pest than mine. For some reason, my links within /admin work fine. In other words, I use /administer for my drupal "admin" menu and then all the remaining links (e.g. /admin/logs) works just fine.

Rob, have you tried contacting your host to ask if they can change the URL of the admin panel?

As I understand it, it will be quite hard to change the /admin path in Drupal. I think "/admin" is hard coded into all the modules which place items in the /admin menu.

Jack Kelly
UKfilm.org - Advice, Discussion and News for the UK filmmaker