PHP怎么取得跳转过来的网址

WBOY
Release: 2016-06-13 13:14:38
Original
864 people have browsed it

PHP如何取得跳转过来的网址?
$_SERVER["HTTP_REFERER"]只能取到用超链接过来的上一个网址,而对跳转过来的网址则无能为力

我要的效果是:

我将域名a.buoyeasy.com用cname记录指向fw.yahei.net

fw.yahei.net的首页是这样的:

PHP code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->$url = $_SERVER["HTTP_REFERER"];
echo $url;
Copy after login


访问a.buoyeasy.com时,自动跳转到fw.yahei.net,然后fw.yahei.net的首页显示跳转过来的网址是多少。

现在的结果什么都不显示,怎么办???

------解决方案--------------------
echo $_SERVER['REQUEST_URI'];
试试
------解决方案--------------------
你打印 $SERVER看看,能找到什么迹象没?


感觉域名别名不能这样子找出来
------解决方案--------------------
这个应该是DNS的事(你又说你没弄DNS的实力)。
你还是说说你要实现的最终目的,或一个详细的前后需求!
------解决方案--------------------
关注一下,这个问题我也很想知道
------解决方案--------------------
期待高手前来解决!
------解决方案--------------------
你用cname,还不如直接添加跳转记录
将域名a.buoyeasy.com用tourl记录指向http://fw.yahei.net/index.php?domain=a.buoyeasy.com
------解决方案--------------------

------解决方案--------------------
echo $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!