updated for apache 2.2 & 2.4