简体   繁体   English

需要将所有子域从旧URL重定向到新URL上的子域

[英]Need to redirect all subdomains from old URL to subdomains on new URL

I have migrated a website, and now having issues with users that have saved certain pages and pdfs as bookmarks and are now getting broken link errors. 我已经迁移了一个网站,但现在遇到了与某些用户相关的问题,这些用户已将某些页面和pdfs保存为书签,并且现在遇到断开的链接错误。 I need the links to go to the same areas on the new site. 我需要链接才能转到新站点的相同区域。

I assume it will be some type of code needed to be added to the .htaccess. 我认为这将是需要添加到.htaccess中的某种类型的代码。

Here is an example: 这是一个例子:

Old URL: "www.oldsite.co.nz/things/stuff/thisisapdf.pdf" Needs to go to New URL: "www.newsite.co.nz/files/thisisapdf.pdf" 旧网址:“ www.oldsite.co.nz/things/stuff/thisisapdf.pdf”需要转到新网址:“ www.newsite.co.nz/files/thisisapdf.pdf”

Your help will be much appreciated 您的帮助将不胜感激

I think there are two ways you can go about this using plugins. 我认为可以使用两种方法使用插件。

1) https://wordpress.org/plugins/all-in-one-wp-migration/ - This is great when migrating or moving sites, as it automatically can repoint the urls for you when you reupload. 1) https://wordpress.org/plugins/all-in-one-wp-migration/-在迁移或移动网站时非常有用,因为当您重新上传网站时,它会自动为您重新指向网址。

or 2) https://wordpress.org/plugins/redirection/ - This will allow you to change the urls on a case by case basis. 或2) https://wordpress.org/plugins/redirection/-这将使您可以根据具体情况更改网址。 This is recommended if you don't have too many broken links. 如果您没有太多断开的链接,则建议这样做。

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

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