Rename Admin Paths

Module Drupal Illustration Voir sur Drupal.org
Nb téléchargements : 16904

Components

  • Code
  • Documentation
  • Miscellaneous
  • User interface

Images


Licence

https://www.gnu.org/licenses/old-licenses/gpl-2.0.html

permet de renomer l'url du back office "admin" et également celle des "user"

Release

Status : Published
Projects : Modules
Maintenance status : Actively maintained
Development status : Maintenance fixes only
Supported Branches : 3.0., 8.x-2.
shield Stable releases for this project are covered by the security advisory policy.



Description

This module helps secure the Drupal backend by overriding the admin path.

It provides a settings form for replacing the terms admin and user in Drupal routes (URLs).

This can also help reduce spam from automated bots that expect Drupal sites
to have the user registration form at /user/register.

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.

If another module breaks after enabling this module, the broken module probably uses hard-coded paths instead of paths generated by the router with a route name. This is not something the Rename Admin Paths module can fix.

Instead, open an issue on the relevant module's issue tracker and request that the module use the paths generated by the router.

Drupal 8 / 9 / 10 / 11

A settings form allows to choose replacement term for "admin" and "user".

3.x
3.x is for Drupal 10+. The code is very similar to 2.x, but backwards-compatible code for unsupported versions of Drupal (8 and 9) has been dropped. This is a painless upgrade from 2.x as long as you have the right core version.

8.x-2.x
From now on the module uses the route rebuild event instead of hooks to create routes. The big advantage is that it's no longer has a performance impact on every request and this makes it easier to debug. The routes are cached with the renamed admin paths.

8.x-1.x
This small module just implements hook_outbound_alter and hook_inbound_alter to rename paths.

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.

Known Issues

Hardcoded links in templates/javascript will break. The solution is to create an issue for those modules (or provide a patch for it) so they can fix it. Another issue is the "views" module not supporting routes but uses hardcoded paths instead. A solution for this would be to change the path in the views config.

What do I do if I forgot what I renamed a path to?

Drupal 8+:
Use drush: drush cget rename_admin_paths.settings
Check the database: In the config table, check the value for column config row rename_admin_paths.settings.

Drupal 7:
Use drush: drush vget rename_user_path_value
Check the database: Look in the variables table.

After changing the admin path, links in admin reports do not get rewritten.

The links in admin reports are generated by Views. These links are hard-coded,
so this module cannot do anything about that.

There is an open core issue here: #2939986: Replace "path" with "route".

Credits

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

Supporting this Module

All contributions are welcome. Please submit MRs, not patches, so that the CI tests are run. Please add tests if possible.

If you post an issue and do not receive a response, feel free to contact me by private message in the Drupal Slack (ptmkenny) or via my Drupal.org contact form.



Toutes les informations proviennent du site drupal.org