如何正确地将 url 从自定义 asp.net 解决方案迁移到 Wordpress?

发布于 2024-09-01 11:31:19 字数 504 浏览 1 评论 0原文

我有一个使用 asp.net 构建的网站,其 URL 很丑陋,例如 /DisplayContent.aspx?id=789564

我知道如何迁移数据库,但 Wordpress url 会(自然)不同。

我可以简单地编写一些映射,还是必须在 .htaccess 中包含每个子页面(300 页)的重写规则?

我是否应该为每个现有页面提供重写规则,将完整的旧 url 转换为已知的新 url,例如:

/DisplayContent.aspx?id=789798 -> /2010-5-10/Title-Of-The-Post

即使我设法迁移 URL,新内容的 HTML 结构自然也会有所不同。这对搜索引擎优化有何影响?

我应该同时运行 asp.net 和 wordpress 并从 asp.net 应用程序发出重定向吗?

在不进行 PHP 编程的情况下,对于这种 URL 迁移最有效的解决方案是什么?

I have a web site built using asp.net with ugly URLs like /DisplayContent.aspx?id=789564.

I know how to migrate the database, but the Wordpress urls will be (naturally) different.

Can I simply write some mapping or do I have to include a rewrite rule for each subpage (300 pages) in .htaccess?

Should I provide a rewrite rule for each existing page that would transform a full old url to the known new url, like for example:

/DisplayContent.aspx?id=789798 -> /2010-5-10/Title-Of-The-Post

Even if I manage to migrate the URLs, the structure of the HTML for the new content will naturally be different. How does this affect SEO?

Should I run asp.net and wordpress side by side and issue the redirects from the asp.net application?

What is the most efficient solution to this kind of migration of URLs without doing PHP programming?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

街角卖回忆 2024-09-08 11:31:19

此 WP 插件 重定向 - 无需修改 Apache 即可管理 301 重定向 | Urban Giraffe 具有 CSV 导入功能,因此您可以导入 URL 更改列表并避免使用长 .htaccess 文件。它会记录重定向、404 等。

您将受到某种 SEO 影响,但如果您使用 WTools 验证您的网站,然后提高抓取速度,Google 会快速重新索引。

我会冒险在 php 下运行 WP,而不是并行安装。您甚至可以尝试使用该插件安装 WP 演示版,并在其中添加一些测试 .asp URL。

This WP plugin Redirection - Manage 301 redirections without modifying Apache | Urban Giraffe has a CSV import function, so you can import a list of your URL changes and stay out of a long .htaccess file. It logs redirects, 404's, etc.

You will take some sort of SEO hit, but Google will reindex quickly if you verify your site with WTools and then turn up the crawl rate.

I'd take the plunge and run WP under php rather than a side-by-side install. You might even try a WP demo install with that plugin and throw some test .asp URL's at it.

堇色安年 2024-09-08 11:31:19

这听起来很有趣。我想您将不得不在数据库转储中进行大量查找和替换,以匹配新的(干净的)WordPress url。然后我会抓取这些 aspx url 的列表,并在 .htaccess 或 httpd.conf 中执行 301 重定向列表。这样,您就可以处理页面/帖子中的所有链接以及来自其他网站和书签的任何入站链接。

迁移 URL 后检查工作的另一种方法是使用 Google 网站管理员工具标记网站并修复其报告的任何 404 错误。或者,如果您可以抓取网站上的所有 URL 并模拟记录 HTTP 状态代码的请求,那么您就可以知道您的重定向是否正常工作或返回 404 错误。

This sounds like fun. I'd imagine that you are going to have to do a massive find and replace in the your DB dump that matches your new (clean) WordPress urls. Then I would scrape a list of those aspx urls and do a list of 301 redirects in your .htaccess or httpd.conf. That way you've taken care of any links with in pages/post and any inbound links from other sites and bookmarks.

Another way to check your work once you've migrated your URLs is to tag the site for Google Webmasters Tools and fix any 404 errors it reports. Or if you can scrape all the of the URLs on the site and simulate a request recording the HTTP status code it returns that way you know if your redirects are working or returning a 404 error.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文