如何设置基本url在drupal [英] How to set the base url in drupal
本文介绍了如何设置基本url在drupal的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经尝试在site / default / settings.php中设置$ base_url
这是我设置基本URL的部分
/ **
*基本URL(可选)。
*
*如果您遇到不同网站域的问题,
*取消注释下面的Base URL语句(删除主要的散列符号)
*并填写到您的Drupal安装。
*
*您可能还要强制用户使用给定的域。
*有关更多信息,请参阅.htaccess文件。
*
*示例:
* $ 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';
*
*不允许有一个尾部斜杠; Drupal会为您添加
*。
* /
#$ base_url ='http://www.example.com'; //没有尾随斜杠!
$ base_url ='http:// localhost / mysite'; //没有尾随斜杠!
解决方案
通常你不需要设置base_url,
你只需要清除drupal缓存。
Where I can set the base url for drupal site. Currently when I go to the site in my localhost, it redirects to the original site. Please help me.
I have tried setting the $base_url in the sites/default/settings.php
Here is the portion 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!
解决方案
Usually you don't need to set base_url, you simply have to clear drupal cache.
这篇关于如何设置基本url在drupal的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文