2

I have copied a Drupal installation onto my local machine and I am now running into an issue where only the homepage will load and all other links return a 404.

Clean URLS are enabled but even attempting to manually type the URL like:

?q=admin/module

fails...

I have tried the following:

  • Setting AllowOverride to All
  • including the mod_rewrite module
  • including the usr_module
  • setting the baseURL in settings.php

None have yet appeared to have any effect.

Can anybody suggest anything else to try?

3
  • check for .htaccess issues or run YOURHOST/update.php from a browser to rebuild menus etc perhaps?
    – Jimajamma
    Feb 21, 2012 at 16:02
  • I will... thanks. In the meantime, I turned off CleanURLs in the settings.php file and I can now get access but it's not ideal. Feb 21, 2012 at 16:32
  • If you are using IIS check your web.config file and follow this guide. Drupal clearn URL guide
    – Narayan P
    Nov 23, 2021 at 14:06

3 Answers 3

2

Check that you have the .htaccess file present in your Drupal root folder.

1

This happened to me once, I copied an entire site folder and clean urls didn't work. I'd copied my files by just selecting all the files in a folder, which doesn't select hidden files, so I was missing my .htaccess file in the drupal root folder.

0

This problem could also be caused by editing your Apache config file and changing the default value of DocumentRoot "/var/www/html". Try keeping it at the default even if your site's files are not located in /var/www/html.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.