Skip to main content
Guaka!
from free software to free life
  • Home
  • Guaka
  • Projects

serverconf

  1. Home

Rewrite Rules (not) - Lowercase URLs, but only for some specific paths

This took me enough time to get right to post a little blog post about it:

        RewriteEngine on
        RewriteMap lc int:tolower
        RewriteCond %{REQUEST_URI} (shared|Shared|download|Download)/[A-Z]
        RewriteRule (.*) ${lc:$1} [R=301,L]

Note that this doesn't work in .htaccess - you have to put it higher up in the Apache configuration.

tag:

  • apache
  • serverconf
  • rewritecond
  • rewriterule
  • Read more about Rewrite Rules (not) - Lowercase URLs, but only for some specific paths

Recent stories

WordPress command line interface
Upgraded guaka.org to Drupal 7, moneyless
meteor-phonegap and Radio Meteor
Rest in peace, Taylor
Wikitravel was freed and everyone moved on to Wikivoyage
Some linguistic origins of hospitality
It's just a game?
Javascript everwhere: PhoneGap and Node.js (and no Eclipse)
Back to blog: more posts coming up
Watch out for Autoblogging!
Slicehost DNS API Python code
Remove all blocks from a Drupal theme