Home  >  Article  >  Backend Development  >  请教怎么根据条件跳转

请教怎么根据条件跳转

WBOY
WBOYOriginal
2016-06-13 10:14:34928browse

请问如何根据条件跳转
现在想实现根据访问者访问条件来判断跳转到某个网址。
比如 访问者直接输入网址 跳转到www.a.com,访问者在百度搜索进入 则跳转到www。b.com。
请问要如何实现,初学php只懂一点基础语法

------解决方案--------------------
只有通过点击链接过来的地址才能取得来路.
所以有很多时候是无法正确判断用户的来访地址 也就是你说的访问条件的

后面也就不需要考虑了

------解决方案--------------------
你说的是重定向?

PHP code
header("laocation:http://www.b.com");<br><font color="#e78608">------解决方案--------------------</font><br>用jquery获得输入框里面的值,然后进行if else判断,如果符合要求了再header(“location://http.......)<div class="clear">
                 
              
              
        
            </div>
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