I would like to know how to jump to a website based on the visitor's access conditions. For example, a visitor directly enters the website to jump to www.a.com, and a visitor searches for the website to go to www. B .com. I would like to ask how to implement it. for beginners, php only understands a little basic syntax ------ solution ------------------ only by clicking the link to get the path. in most cases, the user's access location cannot be correctly determined.
Now you want to jump to a website based on the visitor's access conditions.
For example, a visitor directly enters the website to jump to www.a.com, and a visitor searches for the website to go to www. B .com.
How can I implement it? for beginners, php only understands a little basic syntax.
------ Solution --------------------
You can only obtain the path by clicking the link.
In many cases, the user's access address cannot be correctly determined, that is, the access condition you mentioned.
You don't need to worry about it later.
------ Solution --------------------
Are you talking about redirection?
PHP code
Header ("laocation: http://www. B .com ");
------ Solution --------------------
Use jquery to obtain the values in the input box, and then determine if else. if the values meet the requirements, use header ("location: // http .......)