1
我正在使用Javascript和邪惡http-equiv元標記組合將舊博客重定向到一個新博客。爲了防止機器人重複我還補充說:使用Javascript和http-equiv重定向
<meta name="robots" content="noindex" />
重定向片段是如下:
<!--Execute javascript rediect-->
<script type="text/javascript"><!--//--><![CDATA[//><!--
var url = "http://new_loc.blogspot.com/"
(document.images) ? location.replace(url) : location.href = url;
//--><!]]>
</script>
<!--If the browser can be bothered to refresh with new content,
also works if browser has javascript disabled, in mozilla family -->
<meta http-equiv="refresh" content="0;URL=http://new_loc.blogspot.com/" />
然而,這重定向深層鏈接到new_loc的頭版可以迷失方向爲傳入的讀者。我希望javascript和http-equiv技巧的相關鏈接保持不變。什麼是實現這一目標的最佳方式?