<?xml version="1.0"?><rss version="2.0"><channel><title>Comments on Ignore Directories in mod_rewrite - ILoveJackDaniels.com</title><link>http://www.ilovejackdaniels.com/article/ignore-directories-in-mod-rewrite/</link><description>Latest comments on Ignore Directories in mod_rewrite on ILoveJackDaniels.com</description><item><title>Comment on Ignore Directories in mod_rewrite</title><link>http://www.ilovejackdaniels.com/article/ignore-directories-in-mod-rewrite/comments/</link><guid>http://www.ilovejackdaniels.com/article/ignore-directories-in-mod-rewrite/comments/</guid><description>Comment by trifid ( &lt;a href="trifidian@gmail.com"&gt;trifidian@gmail.com&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;Thanks!, worked just the way I wanted with a single line except you have to specify DIR name in .htaccess, &lt;br /&gt;but the following works without DIR name with 3 lines.&lt;br /&gt;[code]&lt;br /&gt;RewriteCond %{REQUEST_FILENAME} -f [NC,OR]&lt;br /&gt;RewriteCond %{REQUEST_FILENAME} -d [NC]&lt;br /&gt;RewriteRule .* - [L]&lt;br /&gt;[/code]</description></item><item><title>Comment on Ignore Directories in mod_rewrite</title><link>http://www.ilovejackdaniels.com/article/ignore-directories-in-mod-rewrite/comments/</link><guid>http://www.ilovejackdaniels.com/article/ignore-directories-in-mod-rewrite/comments/</guid><description>Comment by SEO ( &lt;a href=""&gt;&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;I'm desperately trying to find a .htaccess for rewriting sub directory to subdomain. For instance,&lt;br /&gt;&lt;br /&gt;http://www.domain.com/gardening/roses.html&lt;br /&gt;&lt;br /&gt;to&lt;br /&gt;&lt;br /&gt;http://roses-gardening.domain.com&lt;br /&gt;&lt;br /&gt;Is it possible? I've got wildcard subdomains enabled, i'll check back.&lt;br /&gt;&lt;br /&gt;It's for http://www.articlesdb.net&lt;br /&gt;&lt;br /&gt;Thanks</description></item><item><title>Comment on Ignore Directories in mod_rewrite</title><link>http://www.ilovejackdaniels.com/article/ignore-directories-in-mod-rewrite/comments/</link><guid>http://www.ilovejackdaniels.com/article/ignore-directories-in-mod-rewrite/comments/</guid><description>Comment by Vincent Bray ( &lt;a href="http://freenode.org/#apache"&gt;http://freenode.org/#apache&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;Note that in addition to the RewriteCond solutions listed above, the %{REQUEST_FILENAME} variable is context sensitive.&lt;br /&gt;In a &lt;Directory /doc/root&gt; stanza or a .htaccess file it'll work fine, but in &lt;VirtualHost&gt; %{REQUEST_FILENAME} = %{REQUEST_URI}.&lt;br /&gt;&lt;br /&gt;noodl</description></item><item><title>Comment on Ignore Directories in mod_rewrite</title><link>http://www.ilovejackdaniels.com/article/ignore-directories-in-mod-rewrite/comments/</link><guid>http://www.ilovejackdaniels.com/article/ignore-directories-in-mod-rewrite/comments/</guid><description>Comment by Karl ( &lt;a href="http://"&gt;http://&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;WordPress gives this to use&lt;br /&gt;&lt;IfModule mod_rewrite.c&gt;&lt;br /&gt;RewriteEngine On&lt;br /&gt;RewriteCond %{REQUEST_FILENAME} !-d&lt;br /&gt;RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;RewriteRule . /index.php [L]&lt;br /&gt;&lt;/IfModule&gt;&lt;br /&gt;&lt;br /&gt;And I can't access my script in cgi-bin because of it, and  anything I have tried from here has not worked, and even made my blog break down in most cases.</description></item><item><title>Comment on Ignore Directories in mod_rewrite</title><link>http://www.ilovejackdaniels.com/article/ignore-directories-in-mod-rewrite/comments/</link><guid>http://www.ilovejackdaniels.com/article/ignore-directories-in-mod-rewrite/comments/</guid><description>Comment by Mark Kenny ( &lt;a href="http://beingmrkenny.co.uk/"&gt;http://beingmrkenny.co.uk/&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;Could you put the folder names in just one rule?&lt;br /&gt;&lt;br /&gt;RewriteRule ^(folder_name|folder2|folder3)/.*$ - [PT]&lt;br /&gt;&lt;br /&gt;Or would that introduce performance problems?</description></item><item><title>Comment on Ignore Directories in mod_rewrite</title><link>http://www.ilovejackdaniels.com/article/ignore-directories-in-mod-rewrite/comments/</link><guid>http://www.ilovejackdaniels.com/article/ignore-directories-in-mod-rewrite/comments/</guid><description>Comment by Fajita ( &lt;a href="http://www.timmyandtimmy.com"&gt;http://www.timmyandtimmy.com&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;that pass through rewrite rule just saved me from another 30 minutes of trial and error testing.&lt;br /&gt;&lt;br /&gt;I was doing something similar with the -d, but I didn't have a -f, that probably would have fixed it for me.&lt;br /&gt;&lt;br /&gt;Oh well, this pass through option helped, becuase i think i am only going to have a handful of files that i want to passthrough and not the whole directory.</description></item><item><title>Comment on Ignore Directories in mod_rewrite</title><link>http://www.ilovejackdaniels.com/article/ignore-directories-in-mod-rewrite/comments/</link><guid>http://www.ilovejackdaniels.com/article/ignore-directories-in-mod-rewrite/comments/</guid><description>Comment by Dave Child ( &lt;a href="http://www.ilovejackdaniels.com"&gt;http://www.ilovejackdaniels.com&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;Dario: The problem is though that you have to do the same thing for every folder you want to ignore. That's a lot of unnecessary htaccess files. &lt;br /&gt;&lt;br /&gt;Isaac: Nice rules! Those work perfectly.</description></item><item><title>Comment on Ignore Directories in mod_rewrite</title><link>http://www.ilovejackdaniels.com/article/ignore-directories-in-mod-rewrite/comments/</link><guid>http://www.ilovejackdaniels.com/article/ignore-directories-in-mod-rewrite/comments/</guid><description>Comment by Dario Caregnato ( &lt;a href=""&gt;&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;Hmmm sorry but I can't understand...the way I suggested uses inheritance, so if you put an .htaccess file with &quot;mod_rewrite off&quot; in  the &quot;ignorethisone&quot; directory, also ignorethisone/subfolder1 and ignorethisone/sub1/sub2 etc etc etc won't use anymore mod_rewrite! ;) All you have to do is place  an almost empty htaccess file! And, of course, be tidy with you folder structure...isn't this easier than working with regular expressions??</description></item><item><title>Comment on Ignore Directories in mod_rewrite</title><link>http://www.ilovejackdaniels.com/article/ignore-directories-in-mod-rewrite/comments/</link><guid>http://www.ilovejackdaniels.com/article/ignore-directories-in-mod-rewrite/comments/</guid><description>Comment by Isaac Z. Schlueter ( &lt;a href="http://isaacschlueter.com/"&gt;http://isaacschlueter.com/&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;Here's an even easier way, so that you don't have to remember to update it each time you add a folder:&lt;br /&gt;&lt;br /&gt;RewriteCond %{REQUEST_FILENAME} -f [NC,OR]&lt;br /&gt;RewriteCond %{REQUEST_FILENAME} -d [NC]&lt;br /&gt;RewriteRule .* - [L]&lt;br /&gt;&lt;br /&gt;Or, if you know how many rules you're going to have (if they're auto-generated or some such), you can use the &quot;skip&quot; flag in the RewriteRule.  (WordPress does this with its automatically created rules.)&lt;br /&gt;&lt;br /&gt;RewriteCond %{REQUEST_FILENAME} -d [NC,OR]&lt;br /&gt;RewriteCond %{REQUEST_FILENAME} -f [NC]&lt;br /&gt;RewriteRule .* - [S=523]&lt;br /&gt;... a block of 523 rules</description></item><item><title>Comment on Ignore Directories in mod_rewrite</title><link>http://www.ilovejackdaniels.com/article/ignore-directories-in-mod-rewrite/comments/</link><guid>http://www.ilovejackdaniels.com/article/ignore-directories-in-mod-rewrite/comments/</guid><description>Comment by Dave Child ( &lt;a href="http://www.ilovejackdaniels.com"&gt;http://www.ilovejackdaniels.com&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;Analgesia: That's fine for a couple of rules. But, for a few hundred, I'm not sure that would be practical. That said, that set of conditions could probably be combined with the rule I posted to make life even easier...&lt;br /&gt;&lt;br /&gt;Dario: That's a good solution, but does require many files. Personally, I prefer to keep everything in one file where possible to make things easier to work with later on. Good suggestion though.</description></item></channel></rss>