友好的 URL 与丑陋的查询字符串 URL SharePoint、HTTPModule?
我正在 SharePoint 2010 中开发一个应用程序。
现在我必须解决以下问题: 我有一份新闻清单。每个人都有一个 ID 和 Title。
我有一个知道如何显示它们的 SharePoint 页面。
我需要它,而不是将每个新闻链接为: http://sharepoint/news/viewnews.aspx?title=MySharePointNews01
如下: http://sharepoint/news/MySharePointNews01
我认为编写一个 HttpModule 并执行 Server.Transfer 到 Viewnews.aspx 将完成此任务。
有什么建议吗?
提前致谢。
I am developing an application in SharePoint 2010.
What now I have to resolve is the following:
I have a list of news. Each one has an ID and Title.
I have one SharePoint page that knows how to display them.
I need that instead of linking each news as:
http://sharepoint/news/viewnews.aspx?title=MySharePointNews01
Be as the following:
http://sharepoint/news/MySharePointNews01
I think tha writing an HttpModule and doing Server.Transfer to the Viewnews.aspx will accomplish this.
Any recommendations?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看 IIS URL 重写模块。它将完全满足您的需求,而无需编写任何代码。本文解释得很清楚:
http://learn.iis.net/page.aspx/461/creating-rewrite-rules-for-the-url-rewrite-module/
您可以在此处下载 IIS URL 重写:http://www.iis.net/download/urlrewrite
Have a look at the IIS URL Rewrite module. It will do exactly what you are looking for without having to write any code. This article explains it pretty clear:
http://learn.iis.net/page.aspx/461/creating-rewrite-rules-for-the-url-rewrite-module/
You can download IIS URL Rewrite here: http://www.iis.net/download/urlrewrite