It is said that using httpmodules can be similar:Http://www.infotouch.cn/detail.aspx? Id = 120The URL address of is rewritten:Http://www.infotouch.cn/detail/120.aspx. The most direct advantage is that the search engine can search for pages, because the search engine is? The subsequent parameters are ignored.
Today, I tried to find out that httpmodules can only rewrite URLs with specific extensions (Note: Only ing-ApplicationProgramExtension), find some English documents from Google, and find that this situation is determined by the mechanism of IIS processing requests.
How IIS processes requests for URLs without extensions:
If the request path has an extension, IIS first checks whether the corresponding application extension has been set. If yes, it gives control to the application:
SoHttp://www.infotouch.cn/detail.aspx? Id = 120This situation can be easily handled as longHttp://www.infotouch.cn/detail/120.aspxYou can. This is because IIS handed over control of *. aspx extensions to ASP. NET and then to httpmodules.
If the requested path does not have an extension, for example:Http://www.infotouch.cn/detailSuch a path. IIS first checks whether the virtual path corresponds to a local directory. If a local directory exists, it checks whether the directory has a default file. If yes, the default file path. Otherwise, IIS reports an http404-File Failure error.
Next, read practice.