看起来像目录的URL,但不是 [英] URLs that look like directories, but are not

查看:92
本文介绍了看起来像目录的URL,但不是的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的部分问题是我不知道这项技术的正确用语。



获取维基百科文章的链接,例如 en.wikipedia.org/wiki/Mars 。这并未指向名为Mars的文件夹中的默认文章,它指向查找Mars上文章并显示该文章的DLL。在线新闻媒体做了类似的事情,文章标题的错误版本被编码为URL中的文件夹。



我想在我公司的网站上实现类似的东西。有人可以指出我正确的方向,有关如何编写代码的文章?或至少我可以在谷歌上使用的一些关键词。



提前谢谢。

Part of my problem is that I don't know the correct term for this technology.

Take a link to a Wikipedia article, such as en.wikipedia.org/wiki/Mars. This does not point to the default article in a folder named "Mars", it points to a DLL that looks up the article on Mars and displays that. Online news outlets do something similar, with a mangled version of an article's headline getting encoded as a folder in the URL.

I want to implement something like that on my company's website. Could someone point me in the right direction, with articles on how to write the code? Or at least some key words I can use on Google.

Thanks in advance.

推荐答案

URL重写是您正在寻找的术语。以下是一些例子:



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

使用ASP.NET重写URL的示例 [ ^ ]

http://www.hanselman.com/blog/RedirectingASPNETLegacyURLsToExtensionlessWithTheIISRewriteModule.aspx [ ^ ]



或者另一种方式是URL路由(可能更多是你的'寻找)

http://msdn.microsoft.com/en- us / library / dd329551.ASPX [ ^ ]

带路由的URL ASP.NET 4.0 [ ^ ]
URL Rewriting is the term you're looking for. Here are some examples:

http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx[^]
An Example of URL Rewriting With ASP.NET[^]
http://www.hanselman.com/blog/RedirectingASPNETLegacyURLsToExtensionlessWithTheIISRewriteModule.aspx[^]

Or another way is URL Routing (probably more what you're looking for)
http://msdn.microsoft.com/en-us/library/dd329551.ASPX[^]
URL Routing with ASP.NET 4.0[^]


这篇关于看起来像目录的URL,但不是的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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