• Posts
  • RSS
  • ◂◂RSS
  • Contact

  • Efficient .htaccess

    February 2nd, 2013
    tech  [html]
    In Apache you can put configuration files in each directory: .htaccess files. Every time someone requests a page, however, Apache needs to check for a .htaccess file in that directory, reading and parsing it if it exists. Switching to <Directory> blocks in your main config is much faster, but many places like shared hosting environments can't do that. A solution here might be to add an option to relax Apache's promise of rereading .htaccess files on every request. Instead it could search for them and parse them on startup, and you could either send it a signal to tell it to reload them or it could watch them with inotify.

    As a workaround for now, you could use a converter like this one that reads all your .htaccess files and collects them into a htaccess.conf. (You'd run with AllowOverride off.) If you wanted to use this in a shared environment, though, you'd need to parse the config and check that it's safe, not containing an "</Directory>...<Directory ...>" or other injection.

    Comment via: google plus, facebook

    Recent posts on blogs I like:

    Austerity is Inefficient

    Working on an emergency timetable for regional rail has made it clear how an environment of austerity requires tradeoffs that reduce efficiency. I already talked about how the Swiss electronics before concrete slogan is not about not spending money but ab…

    via Pedestrian Observations February 27, 2021

    Fireside Friday, February 26, 2021

    Fireside this week, but next week we are diving into our long awaited series on pre-modern textile production, though we will be particularly focused on the most important clothing fibers in the Mediterranean world, wool and linen (rather than, say, silk …

    via A Collection of Unmitigated Pedantry February 26, 2021

    The Troubling Ethics of Writing (A Speech from Ancient Sumer)

    (Translated from a transcript of an ancient Sumerian speech by Uruk's most well-respected Scriptological Ethicist) Writing is a profoundly dangerous technology: Access to writing was initially, and still remains, uneven. What's worse, the rich are m…

    via BLOG - Cullen O'Keefe February 15, 2021

    more     (via openring)


  • Posts
  • RSS
  • ◂◂RSS
  • Contact