简体   繁体   中英

"Not Found" Errors on every page except homepage in Drupla website

I have a backup of a Drupal website which is running on a live web server CentOS 7. I have to restore this site on localhost. I have restored database successfully and website folder on localhost, but I am getting "Not Found" error on every page except home page.

I am trying to resolve this issue for one month but unable to resolve, please some one help me to restore the Drupal site on localhost

Now what I have done till now to get issue resolved is-

  1. Enabled mod_rewrite in .htaccess file at /var/www/html (I have placed my website file/folder in html folder)

    #Various rewrite rules.

    < IfModule mod_rewrite.c >

    RewriteEngine on

  2. Base Url (at /var/www/httml/site/default/settings.php)

    $config_directories = array();

    $base_url = "http://localhost/";

    ini_set('session.auto_start', 0);

  3. Server configuration (at /etc/httpd/conf/httpd.conf)

    DocumentRoot "/var/www/html"

     <Directory "/var/www/html"> AllowOverride All # Allow open access: Require all granted </Directory>
  4. Database setting (at /var/www/html/sites/default/settings.php)

    $databases['default']['default'] = array (

    'database' => 'databasenameofmysite',

    'username' => 'root',

    'password' => '',

    'prefix' => '',

    'host' => 'localhost',

    'port' => '3306',

    'namespace' => 'Drupal\Core\Database\Driver\mysql',

    'driver' => 'mysql',

    ); $databases['default']['myseconddb'] = array (

    'database' => 'seconddatabase',

    'username' => 'root',

    'password' => '',

    'prefix' => '',

    'host' => 'localhost',

    'port' => '3306',

    'namespace' => 'Drupal\Core\Database\Driver\mysql',

    'driver' => 'mysql',

     );

    $settings['install_profile'] = 'standard';

    $config_directories['sync'] = 'sites/default/files /config_zESQ5GgK5qMrKo8T75ePMTuxTIkbfrbzv3YQ0LEpvL-YeSdRapewGr-pZ0AHyYK2Z71SH-GGMw/sync';

But unable to resolve issue any how? 错误页面

After so many struggle it was found that it was a problem PHP version running on live server machine and localhost machine. Now after matching PHP version on localhost it is running fine on Windows localhost but again struggling on CentOS7.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM