4

Because of some reason my site stopped working. After that I have uploaded the backup which I had created earlier.

I am getting a "404 Not Found Error The resource requested could not be found on this server!" getting this on every page except index.php and also not able to login into the admin panel.

I already cleared the cache memory and set the is_active option to 1 in core_website, core_store and core_storegroup tables in phpMyAdmin still getting an error... I've tried so many links to solve this issue but the problem didn't resolved till yet.

closed as off-topic by sv3n, Manoj Deswal, Prince Patel, liyakat, Amit Bera Oct 12 '17 at 12:18

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions describing a problem that can't be reproduced OR seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – sv3n, Manoj Deswal, Prince Patel, liyakat, Amit Bera
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    did you try adding index.php to your urls to see if this is the problem. /index.php/customer/account/login/ – David Manners Oct 26 '14 at 20:56
  • 1
    Please accept an answer if it helped you. This website is still in beta and we need a global answer rate of 80% magento.stackexchange.com/help/someone-answers – Anna Völkl Nov 14 '14 at 8:02
  • In my case it was php version when testing in localhost. Switching from php 7 to php 5.6 resolved the problem. But this was just for testing purposes. – JohnyFree Sep 17 at 14:01
11

It sounds like a behavior which can happen if you do not have the ".htaccess" file by Magento or if the ".htaccess" file is messed up.

Please try adding or replacing the current file with the default ".htaccess" file from Magento.

  • 1
    your solution, assuming it works, only works on Apache web servers. – jwogrady Dec 27 '15 at 23:49
  • my .htaccess had redirection code from http to https .. removing that worked for me.. now had to search for the correct way to do that – NMathur Jan 7 at 18:24
8

For the temporary solution I would suggest you the following step to perform

  1. Go to System ->Configuration

  2. On left hand side select General -> Web and under that you will find the Search Engines Optimization tab

    Use Web Server Rewrites => No

I think your server does not having rewrite_module enable please check whether it is enabled or not. Also check that your root directory containing the .htaccess file or not. You still have any problem just contact me on my skype:imrhjadeja. I will provide you more detail

  • 2
    This is possible, but unlikely. Always rule out permissions issues before you start hacking away at the config settings. – jwogrady Oct 26 '14 at 17:40
  • OP clearly mentioned being unable to log into the admin: I fail to see how accessing "system->configuration" is an option, let alone changing a setting in it. – toon81 Dec 2 '16 at 9:56
  • You can edit this by DB directly in table 'core_config_data' - UPDATE core_config_data SET value = '0' WHERE core_config_data.path = 'web/seo/use_rewrites'; Dont forget to flush cache (delete all folders and files in var/cache/) – Martin Mar 22 at 9:39
5

This most likely is a file ownership issue. You probably upload the Magento files as another user and the web server user can't access the files. You have to change ownership so the webserver user owns the files.

First, you need to find out what user your webserver runs under. If your running Ubuntu, it's usually www-data. In that case, you simply go to your root directory at doing the following.

chown -R www-data:www-data magento
  • chown is the change ownership command. -R means it recurses everything under the root folder. In this case, I assume Magento is the name of your directory.

Once you do that be sure to set permissions.

find . -type f -exec chmod 400 {} \;
find . -type d -exec chmod 500 {} \; 
find var/ -type f -exec chmod 600 {} \; 
find media/ -type f -exec chmod 600 {} \;
find var/ -type d -exec chmod 700 {} \; 
find media/ -type d -exec chmod 700 {} \;
chmod 700 includes
chmod 600 includes/config.php

Here is the current link with more details.

NOTE: Pay VERY close attention when reading through that link. You got to add a backslash at the end of the file commands before the semicolons.

  • That link MageBayVaporated. – Fiasco Labs Oct 9 '15 at 1:25
  • @FiascoLabs updated the link. – jwogrady Dec 27 '15 at 23:46
3

the solution for 404 errors on magento 1.9 was to 1-reindex data and 2-flush cache storage

  • Can't believe it was that simple! What do you think caused the 404 error? – Alen Giliana Mar 13 '18 at 23:50
2

Thanks after spending hours looking for a permission or apache issue, the simple fact that copying magento files from a Nautilus window into apache www is not correct.

There is a "hidden" .htaccess file that you cannot see. So either do a manual copy of the .htaccess file or extract directly into the www/html/magento. You can verify the hidden file using a sudo edit just to check if it exists. This corrected all the 404 errors even though index.php was visible in the browser.

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