3

I'm trying to copy my site on my computer.

I've successfully downloaded and setup all the things. My site localhost URL is http://localhost/rich/ and when I run this URL, it opens my site homepage perfectly; after this, any clickable link gives me a 404 error page.

When I run this URL http://localhost/rich/user on my localhost, it gives me the following error:

Not Found

The requested URL /index.php was not found on this server.

Can anyone tell me what is wrong? What should I do it to fix it?

  • 1
    Make sure you have the .htaccess file in root. If yes try reading the section # Various rewrite rules. – niksmac Dec 5 '12 at 4:14
1

Recently had simmilar issue. If your Drupal site were set up with clean url-s , you might want to change

#   RewriteBase /

in .htaccess file

  • Try comment it out.

  • If commented, try to uncomment it.

  • Try to add subdirectory in that declaration, if drupal is installed
    under any

Of course, check mod_rewrite as was suggested by optimusprime619

1

You may need to turn off clean URLs. To access the clean URLs settings page (when clean URLs aren't working) go to yoursite/?q=admin/config/search/clean-urls. Turn off clean URLs here.

Once you can click on the links in your site, you can then figure out what you need to do on your local machine to get clean URLs working.

1

I had the same problem recently and I checked the following to make it work:

  1. Make sure rewrite module is enabled
  2. Make sure in apache you have override all in order that your .htaccess works.
  3. Look for any modifications in your .htaccess that might been conflicting with your new environment, especially those one related to force https. What I ended doing it is to copy the .htaccess from a new drupal project.
  4. Make sure that in settings.php your base_url is commented or properly set it to your current environment
  5. if you are using a mac, verify that in /etc/apache2/users/nameuser.conf you change AllowOverride none to AllowOverride all

I had that problem recently and suggestion number 5 is what it worked for me

0

Please check if there's been any modification done to the .htaccess file in your drupal to suit the Dev environment. Also i'd suggest checking to ensure the rewrite module / mod_rewrite is enabled in your local web server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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