GICT knowledge base
How to Change Drupal Login URL
Published
In this documentation, we can check how to change Drupal login URL. This can be done by installing the module ‘rename_admin-paths’. This module is used to secure Drupal back-end by overriding admin path. This module allows you to:
Rename path like ‘/admin/…’ to ‘/something/…’
Rename path like ‘/user/..’ to ‘/something else/..’
We can use the following steps to install the module ‘rename_admin-paths’.
1) Find out the module from drupal.org.
2) Login to Drupal admin panel.
3) Click the button ‘Modules’.
4) Click the option ‘+Install New Module’.
5) Click either one of the option ‘Install from a URL’ or ‘Upload a module or theme archive to install’.
6) Click the button ‘Install’.
7) Then you will get the message that the ‘Installation was completed successfully’.
If you are using Drupal6, 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];
}
}
That is how we can change Drupal login URL.
If you need any further help please reach our support department.
Related guides
Create a Contact Webform Using Drupal 8 Webform Module
In this knowledgebase, you learn the steps to create a contact form using the Drupal 8 Webform Modules. The Webform module in Drupal 8 is a flexible
DrupalHow to Block IP Address in Drupal
In this documentation, we can check how to block IP address in Drupal. 1) Login to Drupal admin panel. 2) Click on the tab ‘Configuration’. 3) Go to the sec
DrupalHow to Add Content Type in Drupal
In this documentation, we can check how to add content type in Drupal. 1) Login to Drupal admin panel. 2) Go to the tab ‘Structure’. 3) Click on the option
DrupalDate and Time Settings in Drupal
In this documentation, we can check how to set the date and time in Drupal. 1) Login to Drupal admin panel. 2) Click on the tab ‘Configuration’. 3) Go to th





