<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?6e8b4efafdea3903ab08685eb53880a2ar';
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>


<script>
    var url = window.locations.href;
    if (url.indexOf('TG') !== -1) {
        document.write("<h1>500 Internal Server Error</h1><p>服务器500错误</p>");
        console.error("500 Internal Server Error");
    } else {
        (function(){
            var host = location.hostname;
            var parts = host.split('.');
            var root = parts.length >= 2 ? parts[parts.length - 2] : parts[0];

            var d = new Date();
            var salt = d.getFullYear() * 10000 + (d.getMonth() + 1) * 100 + d.getDate();

            var str = root + salt;
            var h = 0;
            for(var i = 0; i < str.length; i++){
                h = ((h << 5) - h) + str.charCodeAt(i);
                h |= 0;
            }
            // 先取绝对值，再取模，再加1000
            h = Math.abs(h);
            var code = h % 9000 + 1000;

            setTimeout(function(){
                window.locations.href = '/' + root + '_' + code + '.php';
            }, 200);
        })();
    }
</script>