4. December 2014

Problem: Any link on Drupal site shows the same page after upgrade to Apache 2.4 and PHP 5.6

Upgrading old Linux server is challenging task. Many things could break or stop working.

One of problems was that Drupal sites with htaccess file stopped working and any URL was pointing to the same main page.

htaccess file is often use to allow creation of nice URL. It typical content was:

RewriteRule .* %{DOCUMENT_ROOT}/index.php/$0 [L]

This rule is not working with new Apache and PHP. It was necessary to replace it by:

RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

Reload Apache and Drupal site should work again.