• 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:

    Governance in Rich Liberal American Cities

    Matt Yglesias has a blog post called Make Blue America Great Again, about governance in rich liberal states like New York and California. He talks about various good government issues, and he pays a lot of attention specifically to TransitMatters and our …

    via Pedestrian Observations November 19, 2020

    Collections: Why Military History?

    This week, I want to talk about the discipline of military history: what it is, why it is important and how I see my own place within it. This is going to be a bit of an unusual collections post as it is less about the past itself and more about how we st…

    via A Collection of Unmitigated Pedantry November 13, 2020

    Misalignment and misuse: whose values are manifest?

    Crossposted from world spirit sock puppet. AI related disasters are often categorized as involving misaligned AI, or misuse, or accident. Where: misuse means the bad outcomes were wanted by the people involved, misalignment means the bad outcomes were wan…

    via Meteuphoric November 13, 2020

    more     (via openring)


  • Posts
  • RSS
  • ◂◂RSS
  • Contact