在Asp.net网页中重写网址. [英] Url Rewrite in Asp.net web pages.

查看:75
本文介绍了在Asp.net网页中重写网址.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



如何在asp.net中使用url重写.
请给我有关此问题的示例.


谢谢和问候,
Naveen.

Hi,

How to use url rewrite in asp.net.
Please give me examples on this issue.


Thanks and Regards,
Naveen.

推荐答案

检查以下链接
http://weblogs.asp. net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx [
check following link
http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx[^]


查看此链接
[使用ASP.NET进行URL重写]

[使用以下方法进行URL重写用于SEO的ASP.NET ]
See this link
[URL Rewriting with ASP.NET]

[URL Rewriting using ASP.NET for SEO]


URLMapping通常可以通过两种方式完成.

1.如果数据来自数据库,则必须在Global.asax文件的Application_Request事件中使用Context.RewritePath方法并在此处处理URL映射.

2.如果要对某些已知页面进行URL映射,则可以使用web.config文件中的"UrlMapping"部分.
URLMapping can be generally done in two ways.

1. If the data is coming from the database you have to use Context.RewritePath method in Application_Request event of Global.asax file and handle the URL Mapping here.

2. If there are some known pages for which you want to do urlmapping you can use UrlMapping section in web.config file.


这篇关于在Asp.net网页中重写网址.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆