IIS 7 HTML伪静态 无需修改应用程序映射
在IIS5和IIS6时代,我们使用URL REWRITING可实现URL重写,使得WEB程序实现伪静态,但默认情况下只能实现.ASPX的伪静态,如果要实现伪静态*.HTML的页面,需要将ISAPI里面的*.HTML应用程序映射改为.NET的ISAPI。但在IIS 7时代,这一切已经变得非常简单了,您在WEB.CONFIG中就可以管理这一切了。
在服务器上安装好Microsoft URL Rewrite Module,具体下载地址如下:
Microsoft URL Rewrite Module for IIS 7.0 (x86)
下载地址:http://www.iis.net/downloads/default.aspx?tabid=34&g=6&i=1691
Microsoft URL Rewrite Module for IIS 7.0 (x64)
下载地址:http://www.iis.net/downloads/default.aspx?tabid=34&g=6&i=1692
安装好之后如图:
可以直接在IIS 7里面进行添加重写规则,也可以直接在WEB.CONFIG中设置:
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
--><?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Rewrite to article.aspx">
<match url="^article/([0-9]+).html$" />
<action type="Rewrite" url="article.aspx?newid={R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
然后,访问 /article/366.html 就是 访问/article.aspx?
相关文档:
在一个网页中的按钮,写onclick事件的处理代码,不小心写成如下:
<input value="Test" type="button" onclick="alert(""OK"");" />
IE提示出错后,再漫不经心地改为:
<input value="Test" type="button" onclick="alert(\"OK\");" />
结果还是出错。
这时,我就想不通了,虽然我知道最直接的解决方法 ......
<OBJECT id=WebBrowser height=0 width=0
classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2></OBJECT>
<INPUT onclick=document.all.WebBrowser.ExecWB(1,1) type=button value=打开 name=Button1>
<INPUT onclick=document.all.WebBrowser.ExecWB(4,1) type=button value=另存为 name=Butt ......
<html>
<head>
<title>实现字体阴影 </title>
</head>
<body>
<div STYLE="position:relative; width=480; &nb ......
System.Net.WebRequest request = System.Net.WebRequest.Create("http://la.jmw.com.cn/c.asp");
request.UseDefaultCredentials = false;
System.Net.WebResponse response = requ ......
谈到
Flash
能走多远的问题时,我们不得不先聊聊作为
Flash
前辈的
Applet
。
所以要提它,是因为人类历史上第一个运行在浏览器之上的交互式应用,本来就是
Java
小程序,而非什么
Flash
。
早在
1995
年之初,当
Gosling
和
Gage
在
WebRunner
浏览器(即日后的
HotJava
浏览器)上 ......