gpt4 book ai didi

drupal - 如何在drupal中设置基本网址

转载 作者:行者123 更新时间:2023-12-04 13:54:44 26 4
gpt4 key购买 nike

我可以在哪里设置 drupal 站点的基本 url。目前,当我在本地主机中访问该站点时,它会重定向到原始站点。请帮我。

我试过在sites/default/settings.php 中设置$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!

最佳答案

通常不需要设置base_url,
你只需要清除 Drupal 缓存 .

关于drupal - 如何在drupal中设置基本网址,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5879190/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com