Easiest way in PHP:
$url = preg_replace('/?.*/', '', $url);
What Facebook does is probably a JavaScript thing, in that fashion:
if (location.href.match(/?.*/) && document.referrer) {
location.href = location.href.replace(/?.*/, '');
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…