The browser will remember the 301 jump.

if($url = "www.xxx.com"){
    header("HTTP/1.1 301 Moved Permanently");
    header("Location: $target_url);
}

the above code, 301 redirect has been accessed in the browser, and the browser will remember that it is permanently redirected. Will directly skip code execution. However, there is a modification to $target_url, that will not take effect without knowing the browser cache. Is there any solution?

Mar.05,2021

to access url, add a timestamp, such as http://localhost/index.php?t=.

.

index.php contains the code for you to jump

if($url = 'www.xxx.com'){
    header('HTTP/1.1 301 Moved Permanently');
    header('Location: $target_url);
}

is actually the browsing cache of the browser. There are two solutions:
one is to add a random number that changes every time on the connection
, and the other is to disable caching. Refer to the Cache-Control of http protocol

.
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-1ea20b3-1ba5.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-1ea20b3-1ba5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?