ISAPI_rewrite中文手册
作者:cmscn 日期:2007-01-12
原文档:http://www.isapirewrite.com/docs/
=========================================
配置:
在NT 2000 XP和2003平台上,在系统帐户下应该INETINFO程序应该与IIS5以共存模式过滤器运行。所以系统帐户应该给予对所有的ISAPI-REWIRITE DLLS 和所有的HTTPD。INI文件至少可读权限,我们也推荐对给予系统帐户对于所有包括HTTPD。INI文件的文件夹的可写权限,这将允许产生HTTP。PARSE。ERRORS文件,这些文件包含配置文件语法错误。对于PROXY模块也需要额外的权限,因为它将运行于连接池或HIGH-ISPLATED应用模式,IIS帐户共享池和HIGH-ISOLATION池应被给予 对RWHELPERE。DLL的可读权限。缺省情况下IWAM-《计算机名》被用于所有的池,在相应的COM+应用设置中应借助COM+ADMINISTRATION MMC SNAP-IN建立池帐户
配置文件格式化:
有两种形式的配置文件-GLOBAL(SERVER-LEVEL)和INDIVIDUAL(SITE-LEVAL)文件,GLOBAL配置文件应被命名为HTTPD.INI并出现在ISAPI-REWRITE安装目录中,文件的快捷方式通过开始菜单提供,INDIVIDUAL配置文件应名为HTTPD。INI并且能够出现在虚拟站点的物理根目录中,两种类型的格式化是相同的并是标准的WINDOWS。INI文件,所有的指令都应该放在这一部分并且所有指令都应该以分隔线放置,任何这一部分以外的文本都将被忽略
HTTPD.INI文件示例
[ISAPI_Rewrite]
# This is a comment
# 300 = 5 minutes
CacheClockRate 300
RepeatLimit 20
# Block external access to the httpd.ini and httpd.parse.errors files
RewriteRule /httpd(?:\.ini|\.parse\.errors) / [F,I,O]
# Block external access to the Helper ISAPI Extension
RewriteRule .*\.isrwhlp / [F,I,O]
# Some custom rules
RewriteCond Host: (.+)
RewriteCond 指令
Syntax:(句法) RewriteCond TestVerb CondPattern [Flags]
这一指令定义一个条件规则,在 RewriteRule 或者 RewriteHeader或 RewriteProxy指令前预行RewriteCond指令,后面的规则 只有它的,模式匹配URI的当前状态并且额外的条件也被应用才会被应用。
TestVerb
Specifies verb that will be matched against regular expression.
特别定义的动词匹配规定的表达式
TestVerb=(URL | METHOD | VERSION | HTTPHeaderName: | %ServerVariable) where:
URL - returns Request-URI of client request as described in RFC 2068 (HTTP 1.1);
返回客户端在RFC2068中描述的需求的Request-URI
METHOD - returns HTTP method of client request (OPTIONS, GET, HEAD, POST, PUT, Delete or TRACE);
返回客户端需求(OPTIONS, GET, HEAD, POST, PUT, Delete or TRACE)的HTTP方法
VERSION - returns HTTP version;
返回HTTP版本
HTTPHeaderName - returns value of the specified HTTP header. HTTPHeaderName can be any valid HTTP header name. Header names should include the trailing colon ":". If specified header does not exists in a client's request TestVerb is treated as empty string.
返回特定义的HTTP头文件的值
HTTPHeaderName =
Accept:
Accept-Charset:
Accept-Encoding:
Accept-Language:
Authorization:
Cookie:
From:
Host:
If-Modified-Since:
If-Match:
If-None-Match:
If-Range:
If-Unmodified-Since:
Max-Forwards:
Proxy-Authorization:
Range:
Referer:
User-Agent:
Any-Custo...
=========================================
配置:
在NT 2000 XP和2003平台上,在系统帐户下应该INETINFO程序应该与IIS5以共存模式过滤器运行。所以系统帐户应该给予对所有的ISAPI-REWIRITE DLLS 和所有的HTTPD。INI文件至少可读权限,我们也推荐对给予系统帐户对于所有包括HTTPD。INI文件的文件夹的可写权限,这将允许产生HTTP。PARSE。ERRORS文件,这些文件包含配置文件语法错误。对于PROXY模块也需要额外的权限,因为它将运行于连接池或HIGH-ISPLATED应用模式,IIS帐户共享池和HIGH-ISOLATION池应被给予 对RWHELPERE。DLL的可读权限。缺省情况下IWAM-《计算机名》被用于所有的池,在相应的COM+应用设置中应借助COM+ADMINISTRATION MMC SNAP-IN建立池帐户
配置文件格式化:
有两种形式的配置文件-GLOBAL(SERVER-LEVEL)和INDIVIDUAL(SITE-LEVAL)文件,GLOBAL配置文件应被命名为HTTPD.INI并出现在ISAPI-REWRITE安装目录中,文件的快捷方式通过开始菜单提供,INDIVIDUAL配置文件应名为HTTPD。INI并且能够出现在虚拟站点的物理根目录中,两种类型的格式化是相同的并是标准的WINDOWS。INI文件,所有的指令都应该放在这一部分并且所有指令都应该以分隔线放置,任何这一部分以外的文本都将被忽略
HTTPD.INI文件示例
[ISAPI_Rewrite]
# This is a comment
# 300 = 5 minutes
CacheClockRate 300
RepeatLimit 20
# Block external access to the httpd.ini and httpd.parse.errors files
RewriteRule /httpd(?:\.ini|\.parse\.errors) / [F,I,O]
# Block external access to the Helper ISAPI Extension
RewriteRule .*\.isrwhlp / [F,I,O]
# Some custom rules
RewriteCond Host: (.+)
RewriteCond 指令
Syntax:(句法) RewriteCond TestVerb CondPattern [Flags]
这一指令定义一个条件规则,在 RewriteRule 或者 RewriteHeader或 RewriteProxy指令前预行RewriteCond指令,后面的规则 只有它的,模式匹配URI的当前状态并且额外的条件也被应用才会被应用。
TestVerb
Specifies verb that will be matched against regular expression.
特别定义的动词匹配规定的表达式
TestVerb=(URL | METHOD | VERSION | HTTPHeaderName: | %ServerVariable) where:
URL - returns Request-URI of client request as described in RFC 2068 (HTTP 1.1);
返回客户端在RFC2068中描述的需求的Request-URI
METHOD - returns HTTP method of client request (OPTIONS, GET, HEAD, POST, PUT, Delete or TRACE);
返回客户端需求(OPTIONS, GET, HEAD, POST, PUT, Delete or TRACE)的HTTP方法
VERSION - returns HTTP version;
返回HTTP版本
HTTPHeaderName - returns value of the specified HTTP header. HTTPHeaderName can be any valid HTTP header name. Header names should include the trailing colon ":". If specified header does not exists in a client's request TestVerb is treated as empty string.
返回特定义的HTTP头文件的值
HTTPHeaderName =
Accept:
Accept-Charset:
Accept-Encoding:
Accept-Language:
Authorization:
Cookie:
From:
Host:
If-Modified-Since:
If-Match:
If-None-Match:
If-Range:
If-Unmodified-Since:
Max-Forwards:
Proxy-Authorization:
Range:
Referer:
User-Agent:
Any-Custo...
几个网站
作者:cmscn 日期:2007-01-12
商城可以借鉴http://shop.8185.com
借鉴下 X-Space 个人门户吧
模版看看www.poco.cn
整合看看http://www.jsp163.com
博客至少要有oblog主要功能
交友模块看看 交友MsLove3.0
借鉴下 X-Space 个人门户吧
模版看看www.poco.cn
整合看看http://www.jsp163.com
博客至少要有oblog主要功能
交友模块看看 交友MsLove3.0
文章多行列表
作者:cmscn 日期:2007-01-11
sub root_main(f_title,c_num,f_num)
%>
<table cellspacing=1 cellpadding=4 class=table>
<tr><td class=td0> <%response.write img_skin(web_img_m)%> <%response.write f_title%></td></tr>
<tr class=bg_td><td>
<table border=0 cellspacing=0 cellpadding=2 width='100%'>
<%
sql="select top "&c_num&" id,c_id,topic,counter from root where hidden=1 order by id desc"
set rs=joekoe_cms.exec(sql,1)
do while not rs.eof
response.write "<tr>"
for i=1 to 4
if rs.eof then exit for
%>
<td>
<%response.write img_skin(web_img_h)%>
<a href="root/root_view.asp?c_id=<%response.write rs("c_id")%>&s_id=<%response.write sid%>&id=<%response.write rs("id")%>" alt='<%response.write joekoe_cms.code_js(joekoe_cms.code_html(rs("topic"),1,0),1)%>' target=_blank>
<%response.write joekoe_cms.code_js(joekoe_cms.code_html(rs("topic"),1,f_num),1)%></a></td>
<%
rs.movenext
next
response.write "</tr>"
loop
rs.close
%>
<table border=0 cellspacing=0 cellpadding=0 width='100%'>
<tr><td align=right><a href="/root/root_list.asp?action=more&c_id=31">浏览更多…</a> </td></tr>
</table></td></tr></table>
<%
end sub
%>
调用 call root_main("美术馆",10,12)
%>
<table cellspacing=1 cellpadding=4 class=table>
<tr><td class=td0> <%response.write img_skin(web_img_m)%> <%response.write f_title%></td></tr>
<tr class=bg_td><td>
<table border=0 cellspacing=0 cellpadding=2 width='100%'>
<%
sql="select top "&c_num&" id,c_id,topic,counter from root where hidden=1 order by id desc"
set rs=joekoe_cms.exec(sql,1)
do while not rs.eof
response.write "<tr>"
for i=1 to 4
if rs.eof then exit for
%>
<td>
<%response.write img_skin(web_img_h)%>
<a href="root/root_view.asp?c_id=<%response.write rs("c_id")%>&s_id=<%response.write sid%>&id=<%response.write rs("id")%>" alt='<%response.write joekoe_cms.code_js(joekoe_cms.code_html(rs("topic"),1,0),1)%>' target=_blank>
<%response.write joekoe_cms.code_js(joekoe_cms.code_html(rs("topic"),1,f_num),1)%></a></td>
<%
rs.movenext
next
response.write "</tr>"
loop
rs.close
%>
<table border=0 cellspacing=0 cellpadding=0 width='100%'>
<tr><td align=right><a href="/root/root_list.asp?action=more&c_id=31">浏览更多…</a> </td></tr>
</table></td></tr></table>
<%
end sub
%>
调用 call root_main("美术馆",10,12)
多行列表 黄页
作者:cmscn 日期:2007-01-11
sub pris_main(f_title,ft,c_num,f_num)
dim i,ii:ii=0
select case ft
case "hot"
sql=" order by counter desc,id desc"
case "good"
sql=" and isgood=1 order by id desc"
case else
sql=" order by id desc"
end select
%>
<table cellspacing=1 cellpadding=4 class=table>
<tr><td class=td0> <%response.write img_skin(web_img_m)%> <%response.write f_title%></td></tr>
<tr class=bg_td><td>
<table border=0 cellspacing=0 cellpadding=2 width='100%'>
<%
sql="select top "&c_num&" id,c_id,name,counter from pris where hidden=1"&sql
set rs=joekoe_cms.exec(sql,1)
do while not rs.eof
response.write "<tr>"
for i=1 to 2
if rs.eof then exit for
%>
<td>
<%response.write img_skin(web_img_h)%>
<a href="pris_view.asp?c_id=<%response.write rs("c_id")%>&s_id=<%response.write sid%>&id=<%response.write rs("id")%>" alt='<%response.write joekoe_cms.code_js(joekoe_cms.code_html(rs("name"),1,0),1)%>' target=_blank>
<%response.write joekoe_cms.code_js(joekoe_cms.code_html(rs("name"),1,f_num),1)%></a></td>
<%
ii=ii+1
rs.movenext
next
response.write "</tr>"
loop
rs.close
%>
<table border=0 cellspacing=0 cellpadding=0 width='100%'>
<tr><td align=right><a href="pris_list.asp?action=<%response.write ft%>">浏览更多…</a> </td></tr>
</table></td></tr></table>
<%
end sub
调用
call pris_main("最新公司","new",10,12)
dim i,ii:ii=0
select case ft
case "hot"
sql=" order by counter desc,id desc"
case "good"
sql=" and isgood=1 order by id desc"
case else
sql=" order by id desc"
end select
%>
<table cellspacing=1 cellpadding=4 class=table>
<tr><td class=td0> <%response.write img_skin(web_img_m)%> <%response.write f_title%></td></tr>
<tr class=bg_td><td>
<table border=0 cellspacing=0 cellpadding=2 width='100%'>
<%
sql="select top "&c_num&" id,c_id,name,counter from pris where hidden=1"&sql
set rs=joekoe_cms.exec(sql,1)
do while not rs.eof
response.write "<tr>"
for i=1 to 2
if rs.eof then exit for
%>
<td>
<%response.write img_skin(web_img_h)%>
<a href="pris_view.asp?c_id=<%response.write rs("c_id")%>&s_id=<%response.write sid%>&id=<%response.write rs("id")%>" alt='<%response.write joekoe_cms.code_js(joekoe_cms.code_html(rs("name"),1,0),1)%>' target=_blank>
<%response.write joekoe_cms.code_js(joekoe_cms.code_html(rs("name"),1,f_num),1)%></a></td>
<%
ii=ii+1
rs.movenext
next
response.write "</tr>"
loop
rs.close
%>
<table border=0 cellspacing=0 cellpadding=0 width='100%'>
<tr><td align=right><a href="pris_list.asp?action=<%response.write ft%>">浏览更多…</a> </td></tr>
</table></td></tr></table>
<%
end sub
调用
call pris_main("最新公司","new",10,12)
jk下拉菜单
作者:cmscn 日期:2007-01-11
images/admin/admin.js
style/joekoe_function.js
function sel_type(trsurl,turl)
{
var sn,i,wdim,temp1,nurl;
wdim=turl.split("|");
sn=wdim.length;
for (i=0;i<sn;i++)
{
nurl=wdim;
temp1="<OPTION value='"+nurl+"'";
if (trsurl==nurl) { temp1+=" selected"; }
temp1+=">"+nurl+"</option>";
document.write(temp1);
}
}
<Select size=1 name=edus>
<script language=javascript>
<!--
sel_type('','不限|初中|高中|中技|中专|大专|本科|硕士|博士');
-->
</script>
</Select>
<Select size=1 name=edus>
<script language=javascript>
<!--
sel_type('<%=rs("edus")%>','不限|初中|高中|中技|中专|大专|本科|硕士|博士');
-->
</script>
</Select>
style/joekoe_function.js
function sel_type(trsurl,turl)
{
var sn,i,wdim,temp1,nurl;
wdim=turl.split("|");
sn=wdim.length;
for (i=0;i<sn;i++)
{
nurl=wdim;
temp1="<OPTION value='"+nurl+"'";
if (trsurl==nurl) { temp1+=" selected"; }
temp1+=">"+nurl+"</option>";
document.write(temp1);
}
}
<Select size=1 name=edus>
<script language=javascript>
<!--
sel_type('','不限|初中|高中|中技|中专|大专|本科|硕士|博士');
-->
</script>
</Select>
<Select size=1 name=edus>
<script language=javascript>
<!--
sel_type('<%=rs("edus")%>','不限|初中|高中|中技|中专|大专|本科|硕士|博士');
-->
</script>
</Select>
一种标准的网页下拉菜单(符合web标准)
作者:cmscn 日期:2007-01-11
<!DOCTYPE html PUBliC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>css菜单演示</title>
<style type="text/css">
<!--
*{margin:0;padding:0;border:0;}
body {
font-family: arial, 宋体, serif;
font-size:12px;
}
#nav {
line-height: 24px; list-style-type: none; background:#666;
}
#nav a {
display: block; width: 80px; text-align:center;
}
#nav a:link {
color:#666; text-decoration:none;
}
#nav a:visited {
color:#666;text-decoration:none;
}
#nav a:hover {
color:#FFF;text-decoration:none;font-weight:bold;
}
#nav li {
float: left; width: 80px; background:#CCC;
}
#nav li a:hover{
background:#999;
}
#nav li ul {
line-height: 27px; list-style-type: none;text-align:left;
left: -999em; width: 180px; position: absolute;
}
#nav li ul li{
float: left; width: 180px;
background: #F6F6F6;
}
#nav li ul a{
display: block; width: 180px;w\idth: 156px;text-align:left;padding-left:24px;
}
#nav li ul a:link {
color:#666; text-decoration:none;
}
#nav li ul a:visited {
color:#666;text-decoration:none;
}
#nav li ul a:hover {
color:#F3F3F3;text-decoration:none;font-weight:normal;
background:#C00;
}
#nav li:hover ul {
left: auto;
}
#nav li.sfhover ul {
left: auto;
}
#content {
clear: left;
}
-->
</style>
<script type=text/javascript><!--//--><![CDATA[//><!--
function menuFix() {
var&a...
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>css菜单演示</title>
<style type="text/css">
<!--
*{margin:0;padding:0;border:0;}
body {
font-family: arial, 宋体, serif;
font-size:12px;
}
#nav {
line-height: 24px; list-style-type: none; background:#666;
}
#nav a {
display: block; width: 80px; text-align:center;
}
#nav a:link {
color:#666; text-decoration:none;
}
#nav a:visited {
color:#666;text-decoration:none;
}
#nav a:hover {
color:#FFF;text-decoration:none;font-weight:bold;
}
#nav li {
float: left; width: 80px; background:#CCC;
}
#nav li a:hover{
background:#999;
}
#nav li ul {
line-height: 27px; list-style-type: none;text-align:left;
left: -999em; width: 180px; position: absolute;
}
#nav li ul li{
float: left; width: 180px;
background: #F6F6F6;
}
#nav li ul a{
display: block; width: 180px;w\idth: 156px;text-align:left;padding-left:24px;
}
#nav li ul a:link {
color:#666; text-decoration:none;
}
#nav li ul a:visited {
color:#666;text-decoration:none;
}
#nav li ul a:hover {
color:#F3F3F3;text-decoration:none;font-weight:normal;
background:#C00;
}
#nav li:hover ul {
left: auto;
}
#nav li.sfhover ul {
left: auto;
}
#content {
clear: left;
}
-->
</style>
<script type=text/javascript><!--//--><![CDATA[//><!--
function menuFix() {
var&a...