首页跳转
<html> <head> <title></title> </head> <body> <script type="text/javascript"> var test = window.location.href; test=test.replace("http://","").replace("www.","") var url=""; switch(test) { case "class.fans/":url="http://www.class.fans/fans/index";break; case "yan.gift/":url="http://www.yan.gift/gift/index";break; default:url="http://www.weekwork.com/gift/index"; } window.location = url; </script> </body> </html>