<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.iis.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:cs="http://blogs.iis.net/"><channel><title>Search results matching tag 'Rules Import'</title><link>http://forums.iis.net/search/SearchResults.aspx?o=DateDescending&amp;tag=Rules+Import&amp;orTags=0</link><description>Search results matching tag 'Rules Import'</description><dc:language>en-US</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Images / CSS / files not visible/reachable</title><link>http://forums.iis.net/p/1155386/1894468.aspx#1894468</link><pubDate>Mon, 23 Feb 2009 18:20:59 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1894468</guid><dc:creator>ruslany</dc:creator><cs:applicationKey>iis7_-_url_rewrite_module-41</cs:applicationKey><description>&lt;p&gt;The regular expression that you have in &amp;quot;Imported Rule 1&amp;quot; is too broad, i.e. it always matches. This causes two things: 1. None of the subsequent rules are ever executed. 2. It rewrites the requests&amp;nbsp;for&amp;nbsp;css&amp;nbsp;and image files to index.php.&lt;/p&gt;
&lt;p&gt;To fix that you can do the following:&lt;/p&gt;
&lt;p&gt;1. Add the following conditions to the &amp;quot;Imported Rule 1&amp;quot;:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;lt;conditions&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;add input=&amp;quot;{REQUEST_FILENAME}&amp;quot; matchType=&amp;quot;IsFile&amp;quot; negate=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;add input=&amp;quot;{REQUEST_FILENAME}&amp;quot; matchType=&amp;quot;IsDirectory&amp;quot; negate=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;&amp;lt;/conditions&amp;gt;&lt;/p&gt;
&lt;p&gt;This will cause to rule to not execute for css and image files.&lt;/p&gt;
&lt;p&gt;2. Move the &amp;quot;Imported Rule 1&amp;quot; to the end of the rules list.&lt;/p&gt;</description></item><item><title>Re: Rewrite URI</title><link>http://forums.iis.net/p/1153504/1886649.aspx#1886649</link><pubDate>Wed, 03 Dec 2008 16:17:29 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1886649</guid><dc:creator>ruslany</dc:creator><cs:applicationKey>iis7_-_url_rewrite_module-41</cs:applicationKey><description>&lt;p&gt;Option for importing of mod_rewrite rules&amp;nbsp;available only&amp;nbsp;when you open URL rewriter UI on a site of vdir level. It is not available on a server level.&lt;/p&gt;</description></item><item><title>Rule import Wizard issues</title><link>http://forums.iis.net/p/1150095/1872645.aspx#1872645</link><pubDate>Thu, 26 Jun 2008 10:13:09 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1872645</guid><dc:creator>species5618</dc:creator><cs:applicationKey>iis7_-_url_rewrite_module-41</cs:applicationKey><description>&lt;p&gt;Just looking at the URL-Rewrite module with a plan to POC wordpress MU and came accross a few things&lt;/p&gt;
&lt;p&gt;1st &lt;br /&gt;being the rule import does not like &amp;quot;RewriteBase BASE/&amp;quot; saying it is not supported, &lt;br /&gt;Great, but it woudl be nice I could then manualy edit the generated XML rule set, so&amp;nbsp;I can apply them, instead of having to Edit the source .htaccess and re-import the file&lt;/p&gt;
&lt;p&gt;2nd&lt;br /&gt;Involve the &amp;quot;[L]&amp;quot; last rule option on .htaccess&lt;br /&gt;the import wizard XML preview correctly included the&amp;nbsp; &amp;#39;stopProcessing=&amp;quot;true&amp;quot; &amp;#39;&amp;nbsp;setting, but having applied the rules, the&amp;nbsp; &amp;#39; stopProcessing=&amp;quot;true&amp;quot; &amp;#39; did not get applied to the imported rules &lt;/p&gt;
&lt;p&gt;&lt;br /&gt;RewriteRule&amp;nbsp; ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 &lt;strong&gt;[L]&lt;br /&gt;&lt;/strong&gt;Became &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;rule name=&amp;quot;ImportedRule5&amp;quot; &amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;match url=&amp;quot;^([_0-9a-zA-Z-]+/)?(wp-.*)&amp;quot; ignoreCase=&amp;quot;false&amp;quot; /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;action type=&amp;quot;Rewrite&amp;quot; url=&amp;quot;{R:2}&amp;quot; /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/rule&amp;gt;&lt;br /&gt;&amp;nbsp;NOT&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;rule name=&amp;quot;ImportedRule5&amp;quot; &lt;strong&gt;stopProcessing=&amp;quot;true&amp;quot;&lt;/strong&gt;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;match url=&amp;quot;^([_0-9a-zA-Z-]+/)?(wp-.*)&amp;quot; ignoreCase=&amp;quot;false&amp;quot; /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;action type=&amp;quot;Rewrite&amp;quot; url=&amp;quot;{R:2}&amp;quot; /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/rule&amp;gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: L flag not being imported from mod_rewrite</title><link>http://forums.iis.net/p/1149827/1871564.aspx#1871564</link><pubDate>Thu, 12 Jun 2008 00:19:07 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1871564</guid><dc:creator>ruslany</dc:creator><cs:applicationKey>iis7_-_url_rewrite_module-41</cs:applicationKey><description>&lt;p&gt;Looks like this is a bug in the rule import tool. Thanks for reporting this - good catch!&lt;/p&gt;</description></item><item><title>Re: QSA being applied by default when importing from mod_rewrite</title><link>http://forums.iis.net/p/1149830/1871559.aspx#1871559</link><pubDate>Thu, 12 Jun 2008 00:00:17 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1871559</guid><dc:creator>ruslany</dc:creator><cs:applicationKey>iis7_-_url_rewrite_module-41</cs:applicationKey><description>&lt;p&gt;The reason why the appendQueryString is set to true is because its semantics in IIS is somewhat different from QSA in mod_rewrite.&lt;/p&gt;
&lt;p&gt;In mod_rewrite if substitution string does not contain query string then the original query string is preserved regardless of QSA flag. For example this rewrite rule:&lt;/p&gt;
&lt;p&gt;rewriterule a b&lt;/p&gt;
&lt;p&gt;will replace &amp;quot;a?c=1&amp;quot; to &amp;quot;b?c=1&amp;quot;.&lt;/p&gt;
&lt;p&gt;In IIS URL rewriter if appendQueryString is set to false then it means that original query string will never be preserved. For example this rewrite rule:&lt;/p&gt;&lt;span style="FONT-SIZE:9pt;"&gt;&lt;font face="Calibri"&gt;&amp;lt;rule&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:9pt;"&gt;&lt;font face="Calibri"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;match pattern=”a”&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:9pt;"&gt;&lt;font face="Calibri"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;action type=“Rewrite” url=”b” appendQueryString=”false” /&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:9pt;"&gt;&lt;font face="Calibri"&gt;&amp;lt;/rule&amp;gt;&lt;/font&gt;&lt;/span&gt; 
&lt;p&gt;will replace &amp;quot;a?c=1&amp;quot; to &amp;quot;b&amp;quot;. Notice that the original query string will be dropped.&lt;/p&gt;
&lt;p&gt;So in order to get the exact same behavior of the converted mod_rewrite rule&amp;nbsp;in IIS&amp;nbsp;the rule importer tool sets this flag to true if the substitution url in mod_rewrite rule did not have the query string.&lt;/p&gt;</description></item><item><title>Re: L flag not being imported from mod_rewrite</title><link>http://forums.iis.net/p/1149827/1871557.aspx#1871557</link><pubDate>Wed, 11 Jun 2008 23:37:17 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1871557</guid><dc:creator>ruslany</dc:creator><cs:applicationKey>iis7_-_url_rewrite_module-41</cs:applicationKey><description>&lt;p&gt;The &amp;quot;L&amp;quot; flag&amp;nbsp;stands for&amp;nbsp;&amp;quot;Last rule&amp;quot;, meaning that if this rule was evaluated successfully then no subsequent rules will be evaluated. In URL rewrite module we have a&amp;nbsp;rule attribute&amp;nbsp;called &amp;quot;stopProcessing&amp;quot;, which has the same semantics as L flag in mod_rewrite. The rule converter should set this flag to &lt;strong&gt;true&lt;/strong&gt; when converting any mod_rewrite rules that use &amp;quot;L&amp;quot; flag. If that is not the case for you - could you post your rule here?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Also, the rule import tool understands only mod_rewrite syntax. ISAPI_Rewrite syntax, while similar to mod_rewrite, has some unique flags and attributes, so the tool will not be convert ISAPI_Rewrite rules reliably.&lt;/p&gt;</description></item></channel></rss>