[SOLVED][Drupal Errors] "Page Not Found" Errors on all pages except homepage.

| | 2 min read

Many Drupal users have encountered "Page Not Found" Errors on all pages except their sites homepage. If you are facing the same error in your Drupal site then read on to find out the solution.

The error is likely caused by a improperly configured mod_rewrite or Clean URLs on the server. Follow the steps below to trace the source and fix the issue.

  • First we have to confirm the root cause of the problem by bypassing the clean URL system.
  • Go to http://www.example.com/index.php?q=user
  • If you can see the login page then we can confirm that mod_rewrite is not working.
  • To check if mod_rewrite in enabled create a php file as follows
  • Name it phpinfo.php and place it in the root of your drive.
  • Go to the file using http://www.example.com/phpinfo.php
  • Check for a section called Loaded Modules. and check if mod_rewrite is enabled.
  • If it is not been loaded by Apache then you would have to load it and the method will vary according to the server configuration.
  • If mod_rewrite has been enabled then proceed to confirm if Drupal's .htaccess file is present in the site's root.
  • Check if it has been enabled by making a backup of the file and then creating a new one as follows
    DirectoryIndex phpinfo.php
  • Go to your site without specifiying a page (http://www.example.com/)
  • If you can see the phpinfo dump then .htaccess might have been misconfigured.
  • You should check the Apache htaccess documentation for "RewriteBase" and "RewriteEngine" settings.
  • If you cannot see the phpinfo dump then your server may not allow .httaccess overrides and you should proceed to allow the appropriate .htaccess overrides in your apache configuration file by referring to the documentation of your particular server setup.

Hope that helps.

The easiest way to solve a Drupal issue is to hand it to the Drupal experts. We can provide a wide range of Drupal support and services to help you maintain and manage your Drupal websites. Get in touch with us to know more.