• 企业400电话
  • 微网小程序
  • AI电话机器人
  • 电商代运营
  • 全 部 栏 目

    企业400电话 网络优化推广 AI电话机器人 呼叫中心 网站建设 商标✡知产 微网小程序 电商运营 彩铃•短信 增值拓展业务
    伪静态web.config配置步骤
    复制代码 代码如下:

    ?xml version="1.0" encoding="UTF-8"?>
    configuration>
    !--第一步注册url重写模块放到webconfig的最上部-->
    configSections>
    section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" />
    /configSections>
    !--第二步添加重写规则-->
    RewriterConfig>
    !--先制定全部重写规则内容-->
    Rules>
    !--制定每个单独页面的规则-->
    RewriterRule>
    !--原始请求地址-->
    SendTo>![CDATA[~/news.aspx?id=$1pid=$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">
    !--第四部url重写防止真实的页面也被重写如果网站中真实存在页面,需要添加编译指令不编译真实的html文件-->
    buildProviders>
    add extension=".html" type="System.Web.Compilation.PageBuildProvider" />
    /buildProviders>
    /compilation>
    !--第三部url重写 将用户的请求页面交给相应的处理程序,注意请求的后缀名格式-->
    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:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv4.0,bitness32" />
    add name="aspnetzangdalei" path="*.zangdalei" verb="GET,POST" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_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>
    您可能感兴趣的文章:
    • asp.net 禁用viewstate在web.config里
    • ASP.NET(C#)应用程序配置文件app.config/web.config的增、删、改操作
    • Web.config(应用程序的配置信息)总结
    • Web.Config文件配置之限制上传文件大小和时间的属性配置
    • 基于动态修改App.Config与web.Config的使用详解
    • ASP.NET web.config中数据库连接字符串connectionStrings节的配置方法
    • IIS7.5使用web.config设置伪静态的二种方法
    • 图解修改IIS web.config配置文件增设置默认文档的方法
    • web.config配置连接字符串的方法
    • web.config使用方法指南
    上一篇:ASP.NE网站发布注意事项简析
    下一篇:C#各种集合操作的性能总结
  • 相关文章
  • 

    © 2016-2020 巨人网络通讯

    时间:9:00-21:00 (节假日不休)

    地址:江苏信息产业基地11号楼四层

    《增值电信业务经营许可证》 苏B2-20120278

    伪静态web.config配置步骤 伪,静态,web.config,配置,步骤,