Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

Turn off (mostly) useless apache modules (See related posts)

When I first ported my old Php app to Textdrive, I got all manners of weird errors. Many of these were from weird Apache modules that are enabled by default here.

My solution was to turn off most of these things in my .htaccess file. Here it goes:

# let Apache recognize the ".php" extension
AddType application/x-httpd-php .php
DefaultType application/x-httpd-php

# make php use this very uncool default charset I had been using for years
php_value default_charset iso-8859-1

# make php define old style global variables
php_flag register_long_arrays On

# stop Apache from spewing "Charset: utf-8"
AddDefaultCharset Off

# stop Apache from silently mangling urls
CheckSpelling Off

# stop Apache from denying perfectly legitimate requests
SecFilterEngine Off

Comments on this post

ubernostrum posts on Sep 30, 2005 at 14:12
Note that turning off mod_security does open you up to all sorts of spam and disables a lot of protection against common exploits. It's probably more trouble than it's worth, given that you can drop exceptions to mod_security in your .htaccess to work around any particular rules that give you problems.

You need to create an account or log in to post comments to this site.


Related Posts