是URL重写还是配置不对
服务器上配置了好多子域名,我想把hqdata.net这种重写成www.sycity.com,规则不知道怎么写,网上搜了半天也没搞明白,高人指点一下。
另外说一下,在地址栏中输入hqdata.net实际上出来的内容是www.sycity.com的,但是地址栏里面里面还是hqdata.net,看起来很别扭,这个应该是url重写的问题吧
------解决方案--------------------
header("location: ".url_getHost('site'));
function url_getHost($host='www'){
$domain=($host?$host.'.':'').'baidu.com';
$url='http://'.$domain.'/';
return $url;
} <div class="clear"></div>
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号