之前,它是可能的,但可能不是做重定向的理想场所。如果添加此JavaScript来所有的页面上twigplay.com它会处理重定向你:
<script type="text/javascript">
(function(){
// changes the location's hostname, the path remains the same
// so if you're at http//twigplay.com/whatever/the/url.html it will
// redirect to http://mimuz.com/whatever/the/url.html
window.location.hostname = 'mimuz.com';
})();
</script>
这可能是更理想的设置您的服务器上的重定向虽然发出HTTP 301通信的事实您已将内容移至新域名。如果您使用的是Apache网络服务器,则您希望使用mod_rewrite来发出重定向。规则样本集,你会放在你的.htaccess
文件:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^twigplay\.com$
RewriteRule ^(.*)$ http://mimuz.com/$1 [L,R=301]
这实际上告诉Apache将重定向去twigplay.com任何URL重定向到相同的URL,但在mimuz.com和发出一个HTTP 301 Moved Permanently头部,它会通知搜索引擎,他们对原始网址的任何信息都应该适用于新的。
真的老兄?下次通知NSFW。 – MonkeyZeus