Application: friendly to search engines.
For example, xxx.com/news.aspx? Search engines like id = 5 are not interested. You can redirect them to xxx.com/news/5.htm.
There are several levels of redirection
1: Over IIS
The request is redirected when the request does not go to IIS for aspx processing. The advantage is that no matter whether it is XX. aspx or not, it can be processed, even if it is the same as PHP, it can be redirected to Asp.net for processing.Program.
2: Asp.net
For example, in globles, You can redirect to xx.aspx, but you cannot redirect to directories, such as pai.htm. (You can also set the filter. Please try again)
so I chose the first method.
there is a good tool: iisrewrite and qwerksoft. original article: Explain. 2: add an ISAPI filter on IIS: IIS management tool/website/attribute/ISAPI filter/Add -- find rewriteeval. dll3: Test Run: restart iisservice, place the helloworld.htm file to the main directory of IIS, and then access localhost/xxhelloworldxxx. if you can open this file, it indicates that the installation is successful (any access path containing the word "helloworld" can be) 4: configure the rewrite rule: Open rewrite. INI, and then add a rule rewriterule. * venturet/([^.] *)/venturet/subt/sindex. aspx? Id = $1. The regular expression is used, which means that there is no suffix (without adding '. '), not redirected to sindex. aspx, and pass the venturet/string as the parameter to sindex. 5: Regular Expressions are case insensitive 6: Meaning: Not only can I subscribe to XX again. files such as xxx can also be redirected to directories without suffixes (such functions cannot be implemented by built-in IIS)
7: the Code in the program does not need to be modified: resposne. redirect ("XXX. aspx? The statement id = xx ") is still correct. Although it is redirected on IIS, it can still redirect the address to the desired place; it's okay to open it with Js.
The second method can also be used, but cannot be used to redirect the directory (the directory is not redirected to the processing domain of asp..net, so the code will not be executed)
Some experts have already clearly written (thundermain. urlrewriter) and have the source code.
Http://www.cnblogs.com/edobnet/archive/2004/06/02/12866.aspx
This is an example of configuration.
<Rule>
<URL> venturet/([^.]. *) </URL>
<Rewrite> venturet \ subt \ sindex. aspx? Id = $1 </Rewrite>
</Rule>
Another one is also good: URL rewriter and helicon Creation
Original article: http://www.chedong.com/tech/google_url.html
It is also written using a regular expression.
In fact, there is also a way to write your own program for redirection.