<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://guaka.org"  xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>Guaka! - rewritecond</title>
 <link>http://guaka.org/tag/rewritecond</link>
 <description></description>
 <language>en</language>
<item>
 <title>Rewrite Rules (not) - Lowercase URLs, but only for some specific paths</title>
 <link>http://guaka.org/2010/06/22/rewrite-rules-not-lowercase-urls-only-some-specific-paths</link>
 <description>&lt;div class=&quot;field field-name-taxonomy-vocabulary-2 field-type-taxonomy-term-reference field-label-above clearfix&quot;&gt;&lt;h3 class=&quot;field-label&quot;&gt;tag: &lt;/h3&gt;&lt;ul class=&quot;links&quot;&gt;&lt;li class=&quot;taxonomy-term-reference-0&quot;&gt;&lt;a href=&quot;/tag/apache&quot;&gt;apache&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;taxonomy-term-reference-1&quot;&gt;&lt;a href=&quot;/tag/serverconf&quot;&gt;serverconf&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;taxonomy-term-reference-2&quot;&gt;&lt;a href=&quot;/tag/rewritecond&quot;&gt;rewritecond&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;taxonomy-term-reference-3&quot;&gt;&lt;a href=&quot;/tag/rewriterule&quot;&gt;rewriterule&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;This took me enough time to get right to post a little blog post about it:&lt;/p&gt;
&lt;pre&gt;
        RewriteEngine on
        RewriteMap lc int:tolower
        RewriteCond %{REQUEST_URI} (shared|Shared|download|Download)/[A-Z]
        RewriteRule (.*) ${lc:$1} [R=301,L]
&lt;/pre&gt;&lt;p&gt;Note that this doesn&#039;t work in .htaccess - you have to put it higher up in the Apache configuration.&lt;/p&gt;
&lt;p&gt;I tried extra RewriteConds, to no avail, somehow Apache seems to add [OR]s anyway, even though the documentation states that you have to specify them (there is no [AND] directive). I tried adding the &quot;shared&quot; and &quot;download&quot; to the RewriteRule, leading to infinite redirects.  Of course adding [NC] to the RewriteCond will also lead to infinite redirects.&lt;/p&gt;
&lt;p&gt;Apache configuration is so much fun.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
<pubDate>Mon, 21 Jun 2010 23:44:03 +0000</pubDate>
<dc:creator>Guaka</dc:creator>
<guid isPermaLink="false">487 at http://guaka.org</guid>
</item>
</channel>
</rss>
