更新时间:2023-11-15 12:39:16
PHP中最简单的方法:
Easiest way in PHP:
$url = preg_replace('/\?.*/', '', $url);
Facebook所做的可能就是这种方式的JavaScript:
What Facebook does is probably a JavaScript thing, in that fashion:
if (location.href.match(/\?.*/) && document.referrer) {
location.href = location.href.replace(/\?.*/, '');
}