【问题标题】:Is it possible to change the url of WebPage on Page_Load in asp.net?是否可以在 asp.net 中更改 Page_Load 上 WebPage 的 url?
【发布时间】:2014-06-16 08:06:07
【问题描述】:

我正在做一个项目。这里我们动态生成网页。网页代码在 Page_Load() 上呈现,它正在根据查询字符串生成数据。

我是这样实现的

http://www.example.com/Request.aspx?cPanelId=(here query string)

问题是 Seo 不能用于查询字符串。

如果我可以改变可以像这样改变网址

http://www.example.com/(Requested query string Page.aspx)

它会正常工作的。

可以实现吗?

【问题讨论】:

  • 这被称为:url 重写...一个来自 IIS 的模块,它会重写您的 url ...不要在页面加载中尝试这个

标签: c# asp.net seo


【解决方案1】:

是的,它可以在 ASP.NET 中实现,这个概念的名称是 URL 重写。请查看以下 url(s) 以了解详细信息以及如何在您的项目中实现它。

http://msdn.microsoft.com/en-us/library/ms972974.aspx

http://weblogs.asp.net/scottgu/tip-trick-url-rewriting-with-asp-net

http://www.iis.net/learn/extensions/url-rewrite-module/creating-rewrite-rules-for-the-url-rewrite-module

【讨论】:

  • 有帮助的兄弟!我使用了 webconfig 方法
猜你喜欢
  • 2012-01-04
  • 1970-01-01
  • 2010-10-07
  • 2012-11-20
  • 1970-01-01
  • 1970-01-01
  • 2011-03-30
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多