IIS7+ - 如何让Url Rewrite Outbound Rule和Dynamic Compression同时工作
来源:互联网 发布:钉钉软件使用说明 编辑:程序博客网 时间:2024/06/05 20:38
很多用过Url Rewrite Outbound Rule的都知道Url Rewrite Outbound Rule不能重写被压缩过的response,如果compression和url rewrite outbound rule同时使用,会导致一个由url rewrite模块所抛出的500.52错误。对于这个问题,本人所见过的网上大多的解决方法是disable compression。然而有没有方法使2者同时工作呢?答案是有的,步骤如下:
首先,你需要在注册表里添加个名为LogRewrittenUrlEnabled的键并赋值为0
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp\Rewrite /v LogRewrittenUrlEnabled /t REG_DWORD /d 0
然后,你需要将dynamicCompressionBeforeCache设为false:
%windir%\system32\inetsrv\appcmd set config "Your Site Name" -section:system.webServer/urlCompression /dynamicCompressionBeforeCache:"False"
最后也是最重要,就是确保url rewrite模块在compression模块之前执行。说到这点很多人会在模块顺序中把RewriteModule移到DynamicCompressionModule的前面,看似合情合理但这是错误的!原因在于当一个outbound请求发生的时候,模块执行的顺序是和列表显示的是相反的,所以将RewriteModule置于DynamicCompressionModule之下才是使rewrite模块在outbound过程中先于compression工作的正确操作。
完成以上3点后,做一个测试,我们就会欣喜地发现url rewrite outbound rule和dynamic compression能同时工作了。
- IIS7+ - 如何让Url Rewrite Outbound Rule和Dynamic Compression同时工作
- IIS7.0 Url Rewrite
- URL Rewrite Rule重写规则
- IIS7 URL Rewrite 用法实例
- windows 2008 IIS7 URL Rewrite 用法
- IIS8如何安装和使用URL重写工具-URL Rewrite
- 【转】Windows7下IIS7.5的伪静态URL Rewrite安装配置和案例综合
- Ngnix Virtul Host 和 rewrite rule 示例
- HTTP Response Compression in a URL rewrite enabled IIS installation
- 让tomcat服务器使用url rewrite
- PHP5.4+内置webserver,Yii中如何隐藏index.php,让URL rewrite
- url rewrite和struts2整合
- thinkphp rewrite rule
- 让无线网卡同时工作在 AP 和 STA 模式
- 让双网卡同时工作在内网和外网
- Win7系统IIS7+ThinkPHP如何使用 REWRITE模式
- Dynamic range compression
- outbound和inbound关系
- Android.mk编译APK范例
- The 2nd GIS-focused algorithm competition, GISCUP 2013
- 一些电商英文缩写的解释
- php 操作 MySQL 中的Blob类型 存储图片
- 直面W5100发热问题
- IIS7+ - 如何让Url Rewrite Outbound Rule和Dynamic Compression同时工作
- sqlserver 查看语句执行时间
- 某机字长为32位,存储容量为64MB,若按字节编址.它的寻址范围是多少?
- 完整的PHP图形验证码程序源码
- MyISAM 和 InnoDB 讲解
- DB2静态SQL和动态SQL 的比较与实践
- UNIX SIGTERM等信号意义 .
- .net webrequest应用
- 来自日本的下载站