最简单的设置一下apache的首页自动跳转,简单起见,直接编辑/var/www/html/index.html,填入一下内容,不用来回设置httpd.conf了就。 This page will take you to the Trac Home Page <span id="totalSecond">3</span> seconds later<br> If you don't want to wait, <a href="trac/" mce_href="trac">Click Here</a> <mce:script language="javascript" type="text/javascript"><!-- var second = document.getElementById('totalSecond').textContent; if (navigator.appName.indexOf("Explorer") > -1) { second = document.getElementById('totalSecond').innerText; } else { second = document.getElementById('totalSecond').textContent; } setInterval("redirect()", 1000); function redirect() { if (second < 0) { location.href = 'trac/'; } else { if (navigator.appName.indexOf("Explorer") > -1) { document.getElementById('totalSecond').innerText = second--; } else { document.getElementById('totalSecond').textContent = second--; } } } // --></mce:script>