IIS Crashing when using {HTTP Referer} to a Header with File

Topics: User Forum
Dec 10, 2006 at 8:39 PM
I'm trying to write a condition that will only allow people to "view" our files through flash application. The header when for the file beubg accessed is http://www.milkyweb.com/flash.swf

This is what I wrote

RewriteCond %{HTTP_REFERER} ^(?!http?://(?:www\.)milkyweb\.com\flash.swf)
RewriteRule .*\.(?:avi) /block.gif I,L

However, IIS would suddenly stop working after a couple of reloads and I get a Service Unavailable. I need to reboot my server everytime this happens.

Anyone have any clues on this or is it just not possible to do a referer when the header is a specific file that accesses the file.
Dec 10, 2006 at 10:06 PM
Excuse my stupidity, but I was missing a slash before flash.swf. Haven't slept for 3 days =(

RewriteCond %{HTTP_REFERER} ^(?!http?://(?:www\.)milkyweb\.com\/flash.swf)
RewriteRule .*\.(?:avi) /block.gif I
Dec 14, 2006 at 10:48 PM
still, it's not very good that a bad ini file can cause IIS to stop responding. This is a bug, I'll have to investigate it.

Feb 24, 2007 at 3:05 AM
This discussion has been copied to Work Item 8465. You may wish to continue further discussion there.