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
                确定文件是否存在,前面勾去掉


    到此全部完成

  • 相关阅读:
    最新版 VS2015|Visual Studio Enterprise 2015简体中文版(企业版)
    MY97 日期控件只输入今天之前的值
    VARIANT类型
    C++ Struct
    MFC网络编程
    套接字编程(VC_Win32)
    套接字相关函数
    网络编程
    char str[] 与 char *str的区别详细解析
    Windows下C++多线程同步与互斥简单运用
  • 原文地址:https://www.cnblogs.com/smartsmile/p/6234303.html
Copyright © 2011-2022 走看看