A few days ago, I was affected by the "shock wave". My server has been affected, and I completely give up the .NET platform, fully turn to the Java platform, but now the OS is still Microsoft, but it is not necessary for a certain day. I will completely give up the Microsoft platform and turn to the Linux platform. So give up IIS, fully turn to Apache. The following is a little experience I have recently used Apache. (1) Proxy: I don't know if you have noticed the Apache's proxy function. Since I used IIS to support ASP.NET, now I have given up IIS, there is a sharp question: How does the original ASP.NET proceed? Let Apache support ASP.NET is clearly unreal, at least there is currently no complete solution (Mono) is now just an experimental thing, and now he is still a linux. So I thought of Apache's agent. Accessing IIS via Apache, it is like Apache supports ASP.NET. Add the following in your apache's httpd.conf, where port 88 is your port used by your IIS. Proxypass / home / http://127.0.0.1:88/proxypassreverse / home / http://127.0.0.1:88/rewriterule ^ / home $ / home / [r] This is http: // localhost / home / You can access your IIS. Is it changing to implement Apache Support ASP / ASP.NET In fact you can also make a website fake mirror in this way, so that the viewers think you have other websites: ProxyPass / home / http://www.sina.com.cn/proxyPassReverse / Home / host/rewriterule ^ / home $ / home / [r] This time you visit http: // LocalHost / Home / Is it already the homepage of www.sina.com.cn? Is it very magical? (2) Reword: I often see that the URL on some websites is this http://www.ibeyond.org/box/computer/2003-8/2003-8-13-1191.html, do you think Is this page really static? Wrong, your eyes deceive your mind, such a URL pointing may also be a dynamic page, which is another magic of Apache: rewrite. (This part requires some regular expressions in my httpd.conf, which has the function of dynamic URL rewriting into a static URL. Rewriterule /box/([ ^/]*): ([^/]* )/([ ^/]*).html /box/view.door?id=/$/$2/$3 [P] is very simple According to the left to right, there is 3 "([^ /] *)?", It means to match any of the characters of any length, which is passed as a parameter of the dynamic URL, and obtains the corresponding page to return to Viewer [P] is to keep the original static URL unchanged, and there are other parameters to refer to Apache's user manual. The advantage of this is to be easily collected by search engines, because the search engine is highly priority to HTML by default, so it is easy to search for search engines. The above is just a few parts of Apache magic, maybe I will slowly in the future (if I have a deeper understanding of Apache).
The above can also be obtained in the Apache's manual, and there is already a Chinese version of the Chinese version of Apache2.0 on the current network. You can check it out. Copyright © http://www.ibeyond.org all, reprint, please refer to the source and reserve copyright information. You can contact me (9cbs@ibeyond.org)