Tuesday 17 January 2012

Cache css and js in .htaccess for speed up your site

AddOutputFilterByType DEFLATE text/css application/x-javascript

Check Apache module is enable or not in Drupal

ob_start ();                              // Capturing
  phpinfo ();                               // phpinfo ()
  $info = trim (ob_get_clean ());           // output
  if(!strpos($info,"mod_headers")) {
    drupal_set_message('headers file module for apache2 is not installed in your system. See the readme for instructions.', 'error');
  }
  else {
    drupal_set_message('headers file module is installed in your system. Follow the instructions carefully to success rest of isntalling.');
  }