I have been trying to migrate a Drupal site to do some development locally. After moving the code, restoring the DB and doing some settings, I got the front page of the site to show up (minus some images). However, when I click on any of the menu links, I get the following error:

Not Found

The requested URL was not found on this server.

Now, I made sure that my base_url is set properly in settings.php. No trailing slash and all that. Currently it is of the type: http://example.com/drupal_directory, where drupal_directory is the directory with the site within Apache's /html folder.

What can I do to fix this? Is there some kind of a setting I am missing? There are no errors in PHP error log.

2 Answers 2


Note: This answer tells you how I fixed it in Ubuntu. I don't know about other operating systems, but you might wanna look up if mod_rewrite exits there too. If yes, you probably need to enable it there too.

I had that happen to me. I fixed it by enabling mod_rewrite.

In your terminal, type:

sudo a2enmod rewrite
sudo service apache2 restart
  • Didn't do anything for me. Jun 14, 2016 at 19:08

Check if the .htaccess file is ok. Sometimes that gets missed when you do a tar or compress your files.

Please reply what happens if you put yourwebsite.com/?q=admin in your browser.

  • Hi Gary, I notice you have still low reputation so I don't know if you can comment on posts already. Please try to make your answer without asking questions. Better to make some assumptions and build on those, or use a comment to ask for clarification. May 14, 2016 at 11:42
  • When I do ?q=user on my local set up, it takes me to the login screen. On the remote server, it also gives "Page not found." Interestingly, the local version works perfectly, but the remote has this problem. The code is identical. Does this sound like the .htaccess file issue? Jun 14, 2016 at 19:07

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.