zoukankan      html  css  js  c++  java
  • 网站使用了UrlRewriter.dll伪静态,iis需要配置哪些地方

    1、.net程序里面需要引用文件Intelligencia.UrlRewriter


    2、Web.config里面进行配置,大致如下:

    <configuration>
    <configSections>
      <section name="rewriter" requirePermission="false" type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter"/>
     </configSections>
    
    <rewriter>
      <!--pages-->
      <rewrite url="^~/Pages/(\w+).html" to="~/Pages/$1.aspx" processing="stop"/>
     </rewriter>
     <system.web>
    <httpModules>
       <add type="Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.UrlRewriter" name="UrlRewriter"/>
       <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
      </httpModules>
     </system.web>
    </configuration>


    3、IIS配置,需要配置两个地方
           选择站点->属性->主目录->配置->这里需要配置两个地方
          1、应用程序扩展->添加->
                    可执行文件:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll
                   扩展名.html
                  确定文件是否存在,前面勾去掉
          2、通配符应用程序映射里面插入,C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll
                确定文件是否存在,前面勾去掉


    到此全部完成

  • 相关阅读:
    python笔记之re模块学习
    python笔记之面向对象
    C# 静态类和非静态类(实例类)
    占位符的使用
    数据类型和数据类型转换
    win7 安装 memcached
    php 汉字转换成拼音
    apache window环境下本地配置虚拟主机
    在浏览器输入一个网址到得到页面的过程
    浅谈线程池ThreadPoolExecutor核心参数
  • 原文地址:https://www.cnblogs.com/smartsmile/p/6234303.html
Copyright © 2011-2022 走看看