PHP header跳转页面是如何修改Referer

WBOY
Release: 2016-06-23 14:07:45
Original
4553 people have browsed it

我从a.html 点击一个a链接到b.php,b.php用header('Location: c.php'),c.php 获取到的HTTP_REFERER是a.html,我想在c.php时候获取的HTTP_REFERER是b.php,如何实现?
试了下这样,不行.
header("HTTP_REFERER:b.php",true);
header("Location: c.php");


回复讨论(解决方案)

不能
referer是由客户端发出的,header跳转仍然是服务器端的过程
如果在b.php模拟客户端,并返回,这样网址只显示b.php
两难

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