有没有网址.aspx扩展 [英] Having URL without .aspx extension
问题描述
我注意到有很多的ASP.NET网站并没有用的.aspx结尾的网址。
I noticed a lot of ASP .Net sites does not have the URL ending with ".aspx".
一个例子是:
- http://stackoverflow.com/questions
难道他们创造一个问题文件夹,并把里面的Default.aspx?
Did they create a Questions folder and put a Default.aspx inside?
在这种情况下,不会出现在多个文件夹的Default.aspx了很多,这是很难维持(即使它是用户友好的)?
In that case, wouldn't there be A LOT of default.aspx in many folders which is hard to maintain (even though it is user-friendly)?
感谢你们。
推荐答案
计算器使用ASP.NET MVC写的。 MVC框架不使用的.aspx
文件。
StackOverflow is written using ASP.NET MVC. The MVC framework does not use .aspx
files.
它的工作原理是在内部使用的路由表的方法 - 在这里看到的概述 。
The way it works internally is by using routing tables - see an overview here.
您也可以做到这一点与 ASP.NET 和的.aspx
文件,也可以使用 URL重写。你可以读到这里的差异。
You can also do this with ASP.NET and .aspx
files or you can use URL rewriting. You can read about the differences here.
这篇关于有没有网址.aspx扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!