Shouldn't the URL Rewrite module appear above the Dynamic Compression module? In the ordered list view, modules appearing earlier in the list get executed before the later modules. Since we want the URL Rewrite to occur before compression, the
URL Rewrite module should appear earlier.
The modules are processed in reverse order on the outbound request . So we want UrlRewrite below compression so it can processed before the request is compressed.
I have followed the directions mentioned and have added the registry key, and set the dynamicCompressionBeforeCache property to false however whenever I enable an outbound URL rewrite with dynamic compression I get the error "outbound rewrite
rules cannot be applied when the content of the http response is encoded ("gzip")"
The following is my web.config file, any help would be greatly appreciated.
I know this is an old one, but hey I just seen the plugin and have been setting up url rewrite on my site.
After getting changing the file paths for the pages I wanted rewritten, and then getting over compression issues and disabling them entirely I seen this post.
so I have added the 3 points as highlighted here and when I go enable dynamic compression I get a server 500 error when trying to view any of the site pages.
Once I disable it again it works fine, but of course I could really do with dynamic compression enabled.......
I am assuming you are referring to the followings stepos, reposting in case.
The one I would double check is the module order
For outbound you want Dynamic Compression Above . URLRewrites as they are processed in revese order on the way out.
Outbound rewriting can be used together with IIS dynamic compression by using the following workaround:
Set the LogRewrittenUrlEnabled registry key:reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp\Rewrite /v LogRewrittenUrlEnabled /t REG_DWORD /d 0
Make sure that dynamicCompressionBeforeCache property is set to false for the /system.webServer/urlCompression configuration element.
Re-order the IIS modules to have URL Rewrite module (RewriteModule) run before Dynamic Compression module (DynamicCompressionModule). In the IIS Manager user interface in the modules's ordered view the Dynamic Compression module should be above the URL
Rewrite module.
To trobuleshoot use Failed Request Tracing and it will tell you if the Compression Module is being invoked before UrlRewrite.
rchivert
2 Posts
Re: URL Rewrite Outbound Rules w/ Compression
Jul 16, 2010 06:47 PM|LINK
Shouldn't the URL Rewrite module appear above the Dynamic Compression module? In the ordered list view, modules appearing earlier in the list get executed before the later modules. Since we want the URL Rewrite to occur before compression, the URL Rewrite module should appear earlier.
-bob
richma
1084 Posts
Microsoft
Re: URL Rewrite Outbound Rules w/ Compression
Jul 16, 2010 07:11 PM|LINK
@ rchivert
The modules are processed in reverse order on the outbound request . So we want UrlRewrite below compression so it can processed before the request is compressed.
hth
richard
rchivert
2 Posts
Re: URL Rewrite Outbound Rules w/ Compression
Jul 16, 2010 07:37 PM|LINK
"Oubound rewriting cannot be used together with IIS static compression."
Does this mean we need to explicitly disable static compression?
-bob
namamai
2 Posts
Re: URL Rewrite Outbound Rules w/ Compression
Jun 08, 2012 12:33 AM|LINK
I know this post is old but...
I have followed the directions mentioned and have added the registry key, and set the dynamicCompressionBeforeCache property to false however whenever I enable an outbound URL rewrite with dynamic compression I get the error "outbound rewrite rules cannot be applied when the content of the http response is encoded ("gzip")"
The following is my web.config file, any help would be greatly appreciated.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpErrors errorMode="Custom">
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" subStatusCode="-1" prefixLanguageFilePath="" path="/404.asp" responseMode="ExecuteURL" />
</httpErrors>
<directoryBrowse enabled="false" />
<rewrite>
<outboundRules>
<rule name="testing" enabled="false">
<match filterByTags="A, Area, Base, Form, Img" pattern="^images/logo_and_image.jpg$" />
<action type="Rewrite" value="http://mycdndomain.com/productcart/pc/images/email_signature/logo_and_image.jpg" />
<conditions trackAllCaptures="false" />
</rule>
<customTags>
</customTags>
</outboundRules>
</rewrite>
<httpProtocol>
<customHeaders>
<remove name="X-Powered-By" />
<remove name="X-Powered-By-Plesk" />
</customHeaders>
</httpProtocol>
<urlCompression doStaticCompression="false" doDynamicCompression="true" dynamicCompressionBeforeCache="false" />
</system.webServer>
</configuration>
coolansh63
3 Posts
Re: URL Rewrite Outbound Rules w/ Compression
Jun 10, 2012 01:45 PM|LINK
namamai
2 Posts
Re: URL Rewrite Outbound Rules w/ Compression
Jun 14, 2012 12:36 AM|LINK
This does not help. I am re-writing the urls as we are loading files from a CDN & don't want to just simply map the current requests to a cdn.
JamieO
1 Post
Re: URL Rewrite Outbound Rules w/ Compression
Mar 06, 2013 02:29 PM|LINK
I know this is an old one, but hey I just seen the plugin and have been setting up url rewrite on my site.
After getting changing the file paths for the pages I wanted rewritten, and then getting over compression issues and disabling them entirely I seen this post.
so I have added the 3 points as highlighted here and when I go enable dynamic compression I get a server 500 error when trying to view any of the site pages.
Once I disable it again it works fine, but of course I could really do with dynamic compression enabled.......
Any suggestions?
Thanks in advance
richma
1084 Posts
Microsoft
Re: URL Rewrite Outbound Rules w/ Compression
Mar 06, 2013 08:52 PM|LINK
I am assuming you are referring to the followings stepos, reposting in case.
The one I would double check is the module order
For outbound you want Dynamic Compression Above . URLRewrites as they are processed in revese order on the way out.
Outbound rewriting can be used together with IIS dynamic compression by using the following workaround:
To trobuleshoot use Failed Request Tracing and it will tell you if the Compression Module is being invoked before UrlRewrite.