asp.net - 将纯 HTML 页面转换为 ASP .NET aspx 页面的最佳 "process"?

标签 asp.net html seo

我的网站上有一些页面是纯 HTML 页面,但我想向这些页面添加一些 ASP .NET 类型的功能。我担心的是,如果我简单地将 .html 页面重命名为 .aspx,我会破坏链接,失去 SEO,等等。

我认为对于如何处理这种情况存在“最佳实践”。

最佳答案

在 aspx 上创建您的新页面,并仅从 HTML 页面提供 301 永久重定向。

搜索蜘蛛足够聪明,可以意识到内容已经移动,不会惩罚您。

Google 和 Yahoo 都表示他们会毫不延迟地将元刷新解析为 301 重定向,所以只需执行以下操作即可:

<html>
<head>
<title>Moved to new URL: http://example.com/newurl</title>
<meta http-equiv="refresh" content="0; url=http://example.com/newurl" />
<meta name="robots" content="noindex,follow" />
</head>
<body>
<h1>This page has been moved to http://example.com/newurl</h1>
<p>If your browser doesn't redirect you to the new location please <a href="http://example.com/newurl"><b>click here</b></a>, sorry for the hassles!</p>
</body>
</html>

关于asp.net - 将纯 HTML 页面转换为 ASP .NET aspx 页面的最佳 "process"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/273356/

相关文章:

c# - MVC 5 反向代理身份验证并使用角色,仅使用用户名

html - 有没有一种方法可以判断 IE7 是在标准模式还是 Quirks 模式下呈现页面

html - 如何删除内联/内联 block 元素之间的空间?

seo - 我们如何使网站首先出现在 Google 搜索中?我们能控制这个吗?

regex - 如何为 N 参数创建 RewriteRule?

url - "SEO Friendly"url 可以包含唯一 ID 吗?

asp.net - 检查所有文本框是否不为空的有效方法

c# - 大型站点上的 SQL 执行缓慢(调用存储过程)

c# - 哪种设计模式用于过滤查询? C#

javascript - 对于事件页面链接,我如何使用作悬停显示的 data-alt-src 图像变为事件状态