什么是URL重写(任何人都可以提供代码(asp.net,c#)及其工作方式) [英] What is URL Rewriting (any one can provide the code (asp.net,c#) and how it works)

查看:52
本文介绍了什么是URL重写(任何人都可以提供代码(asp.net,c#)及其工作方式)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是URL重写(任何人都可以提供代码(asp.net,c#)及其工作方式)

What is URL Rewriting (any one can provide the code (asp.net,c#) and how it works)

推荐答案

来自MSDN,

< MSDN>
URL重写是拦截传入的Web请求并将请求重定向到其他资源的过程.执行URL重写时,通常会检查所请求的URL,并根据其值将请求重定向到其他URL.例如,在网站重组导致/people/目录中的所有网页都移至/info/employees/目录的情况下,您可能希望使用URL重写来检查是否针对该Web请求. /people/目录中的文件.如果请求是针对/people/目录中的文件,则您希望将请求自动重定向到相同的文件,但要重定向至/info/employees/目录中.
</MSDN>

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

ASP.NET 2.0中的URL重写 [ http://weblogs.asp. net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx [ http://www.simple -talk.com/dotnet/asp.net/a-complete-url-rewriting-solution-for-asp.net-2.0/ [ http://www.google.co.in/search?hl=zh_CN&q=URL+重写+ in + asp.net& meta =& aq = f& oq = URL +重写+ in + asp.ne [
From MSDN,

<MSDN>
URL rewriting is the process of intercepting an incoming Web request and redirecting the request to a different resource. When performing URL rewriting, typically the URL being requested is checked and, based on its value, the request is redirected to a different URL. For example, in the case where a website restructuring caused all of the Web pages in the /people/ directory to be moved to a /info/employees/ directory, you would want to use URL rewriting to check if a Web request was intended for a file in the /people/ directory. If the request was for a file in the /people/ directory, you''d want to automatically redirect the request to the same file, but in the /info/employees/ directory instead.
</MSDN>

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

URL Rewriting in ASP.NET 2.0[^]

http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx[^]

http://www.simple-talk.com/dotnet/asp.net/a-complete-url-rewriting-solution-for-asp.net-2.0/[^]

http://www.google.co.in/search?hl=en&q=URL+Rewriting+in+asp.net&meta=&aq=f&oq=URL+Rewriting+in+asp.ne[^]


这篇关于什么是URL重写(任何人都可以提供代码(asp.net,c#)及其工作方式)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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