问题:
解决:
js:
<script type="text/javascript">
function goTo(url){
var ua = navigator.userAgent;
if(ua.indexOf('MSIE')>=0){
var rl = document.createElement('a');
rl.href= url;
document.body.appendChild(rl);
rl.click();
}else{
location.href = url;
}
}
function getReferer(){
if(document.referrer=="域名"){
return document.referrer;
}else{
//跳转到错误页面
return false;
}
}
</script>
PHP端
$host = $_SERVER['HTTP_HOST']; //获取host
if($host !== '域名'){
//错误跳转
}