手机
当前位置:查字典教程网 >编程开发 >asp.net教程 >伪静态web.config配置步骤
伪静态web.config配置步骤
摘要:复制代码代码如下:~/news/(.[0-9]*)/(.[d]*).html~/product/(.[d]*).zangdalei

复制代码 代码如下:

<?xml version="1.0" encoding="UTF-8"?>

<configuration>

<>

<configSections>

<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" />

</configSections>

<>

<RewriterConfig>

<>

<Rules>

<>

<RewriterRule>

<>

<SendTo><![CDATA[~/news.aspx?id=$1&pid=$2]]></SendTo>

<>

<LookFor>~/news/(.[0-9]*)/(.[d]*).html</LookFor>

</RewriterRule>

<RewriterRule>

<>

<SendTo><![CDATA[~/product.aspx?pid=$1]]></SendTo>

<>

<LookFor>~/product/(.[d]*).zangdalei</LookFor>

</RewriterRule>

</Rules>

</RewriterConfig>

<system.web>

<compilation debug="false" targetFramework="4.0">

<>

<buildProviders>

<add extension=".html" type="System.Web.Compilation.PageBuildProvider" />

</buildProviders>

</compilation>

<>

<httpHandlers>

<add verb="*" path="*.html" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />

<add verb="*" path="*.zangdalei" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />

</httpHandlers>

</system.web>

<system.webServer>

<handlers>

<add name="aspnethtml" path="*.html" verb="GET,POST" modules="IsapiModule" scriptProcessor="C:WindowsMicrosoft.NETFrameworkv4.0.30319aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv4.0,bitness32" />

<add name="aspnetzangdalei" path="*.zangdalei" verb="GET,POST" modules="IsapiModule" scriptProcessor="C:WindowsMicrosoft.NETFrameworkv4.0.30319aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv4.0,bitness32" />

</handlers>

<defaultDocument>

<files>

<clear />

<add value="default.aspx" />

<add value="default.html" />

</files>

</defaultDocument>

</system.webServer>

</configuration>

【伪静态web.config配置步骤】相关文章:

asp.net操作xml增删改示例分享

web.config使用方法指南

datatable行转列示例分享

C#设置本地网络如DNS、网关、子网掩码、IP等等

微软发布的Data Access Application Block的使用代码

asp.net Hashtable 遍历写法

动态加载Js代码到Head标签中的脚本

DataGrid同时具有分页和排序功能及注意点

asp.net post方法中参数取不出来的解决方法

ASP.NET State service状态服务的问题解决方法

精品推荐
分类导航