7

drupal サイトのベース URL を設定できる場所。現在、ローカルホストのサイトにアクセスすると、元のサイトにリダイレクトされます。私を助けてください。

sites/default/settings.php に $base_url を設定してみました

これは、ベース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!
4

3 に答える 3

8

通常、base_url を設定する必要はありません。drupalキャッシュをクリアするだけです。

于 2011-05-04T07:17:57.177 に答える
3

設定.php

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

編集これを投稿したときに編集しました。設定しているファイルの部分を貼り付けることはできますsettings.phpか? の他の場所に他の$base_urlセットはありませsettings.phpんか?

于 2011-05-04T06:17:11.953 に答える