手机
当前位置:查字典教程网 >编程开发 >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开发中正则表达式中BUG分析

asp.net 因为数据库正在使用的解决方法

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

vs.Net2003无法打开或创建Web应用程序若干解决办法.

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

ASP.NET中为DataGrid添加合计字段

web.config文件的中文解释

asp.net实现文件无刷新上传方法汇总

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

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

精品推荐
分类导航