IIS 7 & IIS 8
URL Rewrite Module
URL Rewrite Outbound Rules w/ Compression
Last post Mar 06, 2013 08:52 PM by richma
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.
Jul 16, 2010 07:11 PM|LINK
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.
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?
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"?>
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" subStatusCode="-1" prefixLanguageFilePath="" path="/404.asp" responseMode="ExecuteURL" />
<directoryBrowse enabled="false" />
<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" />
<remove name="X-Powered-By" />
<remove name="X-Powered-By-Plesk" />
<urlCompression doStaticCompression="false" doDynamicCompression="true" dynamicCompressionBeforeCache="false" />
Jun 10, 2012 01:45 PM|LINK
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.
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.......
Thanks in advance
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.