How to set base url in drupal

Where can I set the base url for the drupal site. Currently, when I go to the site in my local host, it is redirected to the original site. Please help me.

I tried setting $ base_url in sites /default/settings.php

Here is the part where I set the base url

/**
 * Base URL (optional).
 *
 * If you are experiencing issues with different site domains,
 * uncomment the Base URL statement below (remove the leading hash sign)
 * and fill in the URL to your Drupal installation.
 *
 * You might also want to force users to use a given domain.
 * See the .htaccess file for more information.
 *
 * Examples:
 *   $base_url = 'http://www.example.com';
 *   $base_url = 'http://www.example.com:8888';
 *   $base_url = 'http://www.example.com/drupal';
 *   $base_url = 'https://www.example.com:8888/drupal';
 *
 * It is not allowed to have a trailing slash; Drupal will add it
 * for you.
 */
# $base_url = 'http://www.example.com';  // NO trailing slash!
$base_url = 'http://localhost/mysite';  // NO trailing slash!
+6
source share
3 answers

Usually you do not need to set base_url, you just need to clear the drupal cache .

+8
source

settings.php

$base_url = 'http://baseurl.com';

EDIT , . settings.php , ? , settings.php $base_url?

+3

, , , , " ", , . , . , - .

0

All Articles