Quantcast
Channel: All Forums
Viewing all articles
Browse latest Browse all 27852

URL Rewrite Rule via GUI Too Verbose?

$
0
0

Using IIS 7.5 and URL Rewrite 2.0, I've created a rule to AbortRequest on files with a .smi extension.  The .smi file is looked for when a client has set Closed Caption to ON in WMP, and I'd like to prevent the 404 from being logged, and this rule does that..

From the GUI wizard, the following rule is created, (which, if I've filled out the fields correctly) looks like this in the applicationHost.config file:

<rule name="RequestBlockingRule1" patternSyntax="Wildcard" stopProcessing="true">
<match url="*" />
<conditions>
<add input="{URL}" pattern="*.smi" />
</conditions>
<action type="AbortRequest" />
</rule>

In the GUI, editing the rule after creation, to remove what looks like unnecesary keys, I have this result in the applicationHost.config. Where there is no condition, and just a match to the URL (file extension) to AbortRequest on.

<rule name="RequestBlockingRule1" patternSyntax="Wildcard" stopProcessing="true">
<match url="*.smi" />
<conditions>
</conditions>
<action type="AbortRequest" />
</rule>

BOTH of these rules work.  I'm unclear as to the ins/outs of "match url" and "conditions" keys.  I'd like to make this rule as simple as possible, with the least overhead, and of course w/o creating any side effects.  What is the best way to configure this AbortRequest URL Rewrite rule?

Thanks,

Dan Foxley


Viewing all articles
Browse latest Browse all 27852

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>