A few days ago, I used Linux as a server to write something and found that. htaccess under Apache is really a good thing! Not only can the URL be truly overwritten, but also false rewriting can be implemented. Real rewriting can effectively reduce the code volume and server resource consumption. pseudo rewriting can effectively reduce the server's static file volume and save space! In fact, the htaccess function is far more than that.
Now, can we implement the exciting features of htaccess in IIS? ASP. NET2.0 is not a server-level task and cannot be used to rewrite the task. Therefore, it is only necessary to submit the task to ISAPI and search for it online. A company (organization) has developed such a task! Incredible!
Official Address: http://www.isapirewrite.com/
The downloaded file Rewrite. dll is our ISAPI. Add this dll in IIS and restart it !!! Fantastic !!!
Httpd. ini is equivalent to. htaccess!
The current version is version 2.9. For more information about the technical documentation, see the Chinese manual in English (which is better written in English. It is recommended that you read the English document)
I will not talk much about how to use it. Manual
The following is a simple example:
1. httpd. ini
[ISAPI_Rewrite]
RewriteRule ^ (. *)/([a-z0-9 \-] + \. html) $1/default2.asp \? Filename = $2
2. default2.asp
<% = Request. QueryString %>
3. Enter "http: // localhost/abcd123456.html" in the browser and you will see that the webpage is displayed, but this page is not generated in the background!
Filename=abcd123456.html
This technology is the URL pseudo rewrite technology applied by WordPress. If IIS itself supports this technology, it is estimated that Z-Blog will integrate this technology.
Where can reconstruction be needed when the technology Z-BLOG is applied? You only need to change httpd. ini.
In short, ISAPI_Rewrite and htaccess are both technologies worth learning and mastering, especially htaccess. We should try our best to apply it and discover its potential.