How to identify the source of access in HTML and jump to different pages.

such as:

what if the source 1.m87.cn jumps to 2.m87.cn
if the source jx.mh87.cn jumps to jx.mh87.cn/vip
?

for example, when the caohangyuan.com spider engine comes, there must be a source, so this source is not operated when it belongs to the spider. Just give it what I want to show him. If the user does not show the content to the user, jump directly to the new page.

Jun.22,2022

if it is PHP, you can use $_ SERVER ['HTTP_REFERER'] to determine the source. If it is JavaScript, you can use document.referrer to determine the source.


take the unfinished answer from the one above, and jump to
php:

$url = "www.baidu.com";
header("Location:{$url}");

html itself cannot identify the access source. You can use js or php to redirect


var ref = document.referrer;
if(ref === ''){ location.href= ... }
.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b38524-2c0e6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b38524-2c0e6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?