iis6|iis7|配置URLRewriter|64位操作系统下|.net2.0|.net4.0|配置URLRewriter|Web.config配置详情
想必很多ASP.NET的码友们在IIS配置伪静态被严重纠结过不止一次两次,本园主经过多次站点伪静态配置,总结了一下,IIS版本:IIS 6、IIS 7,服务器:Windows Server 2003、Windows Server 2008,开发机多半是Windows 7,站点.NET Framework 2.0、.NET Framework 4.0 ,随机搭配任意组合,时行时不行,完全靠运气以及人品,被虐千百遍之后,真是刻苦铭心闻者伤心见者也会流泪...
简单粗暴点吧,我认为直接帖上Web.config文件最实在
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter"/>
</configSections>
<RewriterConfig>
<Rules>
<RewriterRule>
<LookFor>~/(\w*).html</LookFor>
<SendTo>~/Default.aspx?id=$1</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/news-(\w*)_(\w*).html</LookFor>
<SendTo>~/Default.aspx?id=$1&tt=$2</SendTo>
</RewriterRule>
</Rules>
</RewriterConfig>
<system.web>
<!--<compilation debug="true" targetFramework="2.0" />-->
<httpHandlers>
<add verb="*" path="*.aspx" type="URLRewriter.RewriterFactoryHandler, URLRewriter"/>
<add verb="*" path="*.html" type="URLRewriter.RewriterFactoryHandler, URLRewriter"/>
</httpHandlers>
</system.web>
<system.webServer>
<handlers> <!--.NET Framework 2.0 或 .NET Framework 4.0 二选一 -->
<!--.NET Framework 2.0 用这-->
<add name="woool1" path="*" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="None" preCondition="classicMode,runtimeVersionv4.0,bitness32"/>
<add name="woool" path="*.html" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="classicMode,runtimeVersionv2.0,bitness32"/>
<!--64位操作系统就加上 ? -->
<add name="woool1_64" path="*" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="None" preCondition="classicMode,runtimeVersionv4.0,bitness32"/>
<add name="woool_64" path="*.html" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="classicMode,runtimeVersionv2.0,bitness32"/>
<!--.NET Framework 2.0 用这结束--> <!--.NET Framework 4.0 用这开始-->
<add name="woool1" path="*" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="None" preCondition="classicMode,runtimeVersionv4.0,bitness32"/>
<add name="woool" path="*.html" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="classicMode,runtimeVersionv2.0,bitness32"/>
<!--64位操作系统就加上 ? -->
<add name="woool1_64" path="*" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="None" preCondition="classicMode,runtimeVersionv4.0,bitness32"/>
<add name="woool_64" path="*.html" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="classicMode,runtimeVersionv2.0,bitness32"/>
<!--.NET Framework 4.0 用这结束--> </handlers>
<!--iis 7.0 下支持 URLRewriter ? -->
<modules>
<add name="ModuleRewriter" type="URLRewriter.ModuleRewriter, URLRewriter"/>
</modules>
</system.webServer>
</configuration>
iis6|iis7|配置URLRewriter|64位操作系统下|.net2.0|.net4.0|配置URLRewriter|Web.config配置详情的更多相关文章
- 64位操作系统下IIS报“试图加载格式不正确的程序”错误
缘由:在64位操作系统下IIS发布32位的项目,报“项目依赖的dll无法读取,试图加载格式不正确的程序”错误. 原因:程序集之间的通讯要么全是64位环境下的,要么全是32位环境下的.不能混编访问.不然 ...
- Installshield 64位操作系统下拷贝文件,如何重定向到32位的系统文件夹下
原文:Installshield 64位操作系统下拷贝文件,如何重定向到32位的系统文件夹下 64位操作系统下拷贝文件重定向问题,在在复制代码前加上Disable(WOW64FSREDIRECTION ...
- Windows 64位操作系统下安装和配置MySQL
一安装方式 MySQL安装文件分为两种,一种是MSI格式的,一种是ZIP格式的.下面来看看这两种方式: MSI格式的可以直接点击安装,按照它给出的安装提示进行安装,Windows操作系统下一般MySQ ...
- (原)解决.NET 32位程序运行在64位操作系统下的兼容性问题
背景:一个第三方组件是C++.NET 32位开发的,后被C#(基于FrameWork4.0)调用并封装成组件,此二次封装的组件无法运行于64位操作系统上. 开发环境:VS2012:解决 ...
- [转]解决win7 64位操作系统下安装PL/SQL后连接报错问题: make sure you have the 32 bits oracle client installed
1. 在Oracle官网(http://www.oracle.com/technetwork/topics/winsoft-085727.html)下载文件: instantclient-basic- ...
- 解决win7 64位操作系统下安装PL/SQL后连接报错问题: make sure you have the 32 bits oracle client installed
1. 在Oracle官网(http://www.oracle.com/technetwork/topics/winsoft-085727.html)下载文件: instantclient-basic- ...
- 64位操作系统下调用32位com的问题
Hello Guys! I am trying to create a simple VBS script to automatically open some .tif images from a ...
- Windows 10 64位操作系统 下安装、配置、启动、登录、连接测试oracle 11g
一.下载oracle安装包 1:详细下载安装版本可见官网:https://www.oracle.com/technetwork/database/enterprise-edition/download ...
- 解决64位操作系统下运行psql的问题
我的机器环境是 win7 64位.正常情况下,只需要安装plsql 和 oracle client,配置好 tnsname.ora 就能正常访问数据库.实际上遇到了几个问题. 1. 在tnsnames ...
随机推荐
- mac下webpagetest搭建
我的server和agent都是在mac上搭建的,所以会和linux下有些不同 一.安装配置Apache和PHP webpagetest需要使用PHP和Apache启动服务.mac默认安装了Apa ...
- chrome 点击上传文件选择框会延迟几秒才会显示 反应很慢
chrome52.0.2743.80以上, accept: { title: 'Images', extensions: 'jpg,jpeg,png', mimeTypes: 'image/*' } ...
- secure boot(安全启动)下为内核模块签名
上一篇随笔中提到了如何在secure boot下安装Nvidia显卡驱动 >>上一篇随笔 如果不需要安装Nvidia显卡驱动,而且要生成密钥,可以参考>> 这篇文章 这里假设生 ...
- RIDE安装遇到的问题及解决方法
1.按照虫师的方法,下载的wxpython3.0 ,启动robotframework-ride,无效,因为版本不一致,所以我又根据终端提示的网址:http://sourceforge.net/proj ...
- IIS上虚拟目录下站点的web.config与根站点的web.config冲突解决方法
IIS7.5上在站点下部署虚拟目录,访问虚拟目录下的项目提示与父节点配置冲突.,节点与的<system.web>节点与主站点的<system.web>冲突解决方法: 在站点下的 ...
- WinForm richtextbox 关键字变红色
private void HilightRichText(RichTextBox control, string hilightString) { int nSel ...
- idea debug 变慢
在run模式下很快大概30s左右,在debug模式下花了2分钟,debug信息不断输出: Returning cached instance of singleton bean....网上查了一下,说 ...
- 【openresty】获取post请求数据FormInputNginxModule模块
关于openresty的一些介绍看这里. 首先,实验背景为openresty作为后台来处理前台post传递的数据. 在openresty内,有一个FormInputNginxModule模块,作用是解 ...
- 移动开发tip
input点击出现背景色和边框,加入样式 -webkit-tap-highlight-color: rgba(255,255,255,0); ios下按钮糊掉,样式表不怎么起作用,使用-webkit- ...
- ps 的一些小东西
1.画圈 画框 新建图层--矩形选框工具(U)--左上角选 '路径'--画圆/画框--编辑(右键)--描边--ok. 2 ctrl+t 大小变换问题