[英]301 redirect for domain change
我的朋友想将她的域名oldsite.com更改为newsite.com。
托管公司是lukrativedomains,他们建议将域名更改为newsite.com,然后将oldsite.com转发到newsite.com
但是,他们提供的转发功能会将所有页面重定向到根newsite.com。 我希望能够将oldsite.com的所有单个页面转发到newsite.com上的同一页面
我需要将内容从oldsite.com复制到newsite.com,然后实施301重定向吗? 如果是这样,我该怎么做,那会是重复的内容吗?
另外,我将如何进行每个页面的301重定向? 我需要她什么? (htaccess?如果是,那在哪里?)
截至目前,newsite.com上没有任何内容,它只是一个停放的页面,但我希望它看起来完全像oldsite.com。
在最小化对SEO的影响的同时执行此操作非常重要。 她不使用wordpress,实际上,我不确定内容在哪里(我在ftp上猜测)
这是我在这种情况下要做的步骤
代码示例:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^oldpage.html$ http://www.newsite.com/newpage.html [R=301,L]
</IfModule>
好好看一下3ed行中发生的情况,我说RewriteRule,然后说“ ^”和页面名称,看起来像是完整URL,如下所示: http : //www.oldsite.com/oldpage.html
例如,假设您要重定向此URL: http : //www.oldsite.com/categories/business/news.html您可以这样输入:
RewriteRule ^categories/business/news.html$ http://www.newsite.com/categories/business/news.html [R=301,L]
如果它不以.html .php结尾,它将如下所示:
RewriteRule ^categories/business/news/$ http://www.newsite.com/categories/business/news/ [R=301,L]
另外,如果您想了解有关重定向的更多信息,建议您阅读这篇文章: http : //moz.com/learn/seo/redirection
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.