Home  >  Article  >  Backend Development  >  单文件301跳转怎么写呢?

单文件301跳转怎么写呢?

WBOY
WBOYOriginal
2016-06-23 14:03:371130browse

比如 http://127.0.0.1:3517/caskesh/data/index.php?i1=23&i2=80 这样的一个地址 如何让它能跳转到

www.baidu.com/7/index.asp?i1=23&i2=80
或者www.baidu.com/7/?i1=23&i2=80  这个页面呢?

i1和i2的参数都是可以修改的 并且跳转后的都是跟跳转前的参数一样。

各位大牛出来指点指点


回复讨论(解决方案)

$i1=$GET['i1'];$i2=$GET['i2'];Header("HTTP/1.1 301 Moved Permanently");Header("Location: www.baidu.com/7/index.asp?i1=".$i1."&i2=".$i2);

楼上正解    :D

Statement:
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