简体   繁体   English

将非常旧的网站移至新域

[英]Moving VERY old website to New Domain

I have been creating a new website for a company and would like some advice on writing a rewrite file. 我一直在为一家公司创建一个新网站,希望就编写重写文件提供一些建议。

I obviously would like to keep our current rankings and transfer them to the new site and i am just wanting to make sure I am doing it correctly. 我显然想保留我们当前的排名并将其转移到新网站,而我只是想确保自己做的正确。

Would a standard 301 redirect with old links to new links work if I also write a rewrite to the home page? 如果我还对主页进行了重写,则将带有旧链接的新链接的标准301重定向有效吗?

This isn't my area and any help would be great. 这不是我的领域,任何帮助都会很大。

Justine 贾斯汀

This Redirect htaccess code below in an htaccess file in the old site's folder would redirect all old site pages and posts to identical matching pages and posts with the same identical structure on the new site/domain. 旧站点文件夹中htaccess文件中下面的此重定向htaccess代码会将所有旧站点页面和帖子重定向到新站点/域上具有相同结构的相同匹配页面和帖子。

RedirectMatch 301 ^/$ http://www.newdomain.com/$1

For some web hosts you need to include the folder name where the website is physically installed. 对于某些Web主机,您需要包括实际安装网站的文件夹名称。 olddomain.com would be the name of the folder and not the URL|URI name. olddomain.com将是文件夹的名称,而不是URL | URI名称。

RedirectMatch 301 ^/olddomain.com$ http://www.newdomain.com/$1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM