Intelligencia.UrlRewriter IIS配置
只要在
在网站上右KEY.>属性.>主目录.>.配置.>.插入(c:\windows\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll) 去掉确认文件是否存在
就OK了.
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="rewriter" requirePermission="false" type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter"/>
</configSections>
<appSettings>
<add key="ConnectionString" value="Server=192.168.1.3;Uid=sa;Pwd=szofcadminzzj888;database=ofcweb;Pooling=true;Max Pool Size=512;Min Pool Size=0;"/>
</appSettings>
<connectionStrings/>
<system.web>
<httpModules>
<add type="Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.UrlRewriter" name="UrlRewriter"/>
</httpModules>
<httpHandlers>
<!--
<add verb="*" path="*.aspx" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
<add verb="*" path="*.html" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
-->
</httpHandlers>
<xhtmlConformance mode="Legacy"/>
<httpRuntime maxRequestLength="2097151" executionTimeout="3600"/>
<!--
设置 compilation debug="true" 可将调试符号插入
已编译的页面中。但由于这会
影响性能,因此只在开发过程中将此值
设置为 true。
-->
<compilation debug="false">
<assemblies>
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies></compilation>
<!--
通过 <authentication> 节可以配置 ASP.NET 用来
识别进入用户的
安全身份验证模式。
-->
<authentication mode="Forms"/>
<!--
如果在执行请求的过程中出现未处理的错误,
则通过 <customErrors> 节可以配置相应的处理步骤。具体说来,
开发人员通过该节可以配置
要显示的 html 错误页
以代替错误堆栈跟踪。
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
</system.web>
<rewriter>
<!-- <if url="/tags/(.+)" rewrite="/tagcloud.aspx?tag=$1" /> -->
<!-- same thing as <rewrite url="/tags/(.+)" to="/tagcloud.aspx?tag=$1" />-->
<rewrite url="~/Team/(.+).html$" to="~/Team/$1.aspx"/>
<rewrite url="~/Team/(.+).ofc$" to="~/Team/TeamView.aspx?id=$1"/>
<rewrite url="~/En/Team/(.+).html$" to="~/En/Team/$1.aspx"/>
<rewrite url="~/En/Team/(.+).ofc$" to="~/En/Team/EnTeamView.aspx?id=$1"/>
<rewrite url="~/En/EnTeam/(.+).html$" to="~/En/EnTeam/$1.aspx"/>
<rewrite url="~/En/EnTeam/(.+).ofc$" to="~/En/EnTeam/EnTeamView.aspx?id=$1"/>
<rewrite url="~/Relation/([a-zA-Z]+).html$" to="~/Relation/$1.aspx"/>
<rewrite url="~/Relation/([a-zA-Z]+).html(.*)$" to="~/Relation/$1.aspx$2"/>
<!--首页新闻-->
<rewrite url="~/News/(.+).html$" to="~/News/$1.aspx"/>
<rewrite url="~/News/(.+).ofc$" to="~/News/News_ofc_view.aspx?id=$1"/>
<rewrite url="~/News/(.+).trade$" to="~/News/News_trade_view.aspx?id=$1"/>
<!--<rewrite url="~/News/(.+)/(.+).do$" to="~/News/$2.aspx" />-->
<rewrite url="~/BBS/" to="~/BBS/index.aspx"/>
<rewrite url="~/test_([a-zA-Z]+).html$" to="~/Show.aspx?Code=$1" processing="stop"/>
<!--<rewrite url="^/([\w-]+\/+){1,}images/(\w+).(gif|jpg|png|swf|bmp)$" to="~/images/$2.$3" processing="stop" />-->
<rewrite url="http://10.0.3.111/BBS/$" to="http://10.0.3.111/BBS/index.aspx%22/>
</rewriter>
</configuration>