Magento2: Magento CE-2.0.0 Front/Back-end “404 Not Found ”

Created on 4 Dec 2015  ·  29Comments  ·  Source: magento/magento2

Hello,

I've download and installed a fresh Magento CE-2.0.0 on MAMP server, the installation finished successfully, The home page opened, but any other link landing to 404 error (Page not found), Also I trying to access to the back end (/admin) but unfortunately 404 error :(

I read a lot of articles like #2309 #2278 and #2272, But the problem not solved!
This problem seems common problem, but I don't know why all the suggestions solutions does not work for me ?

My environment :

MAC OS X El Capitan
MAMP Server 3.4
PHP 5.6.10
MySQL 5.6.25
Magento-CE-2.0.0+Samples-2015-11-17-06-11-18

Please help me to solve this issues, This is the fourth day with this problem :(

Format is not valid needs update

Most helpful comment

* Remove index.php from url *
Run Command In Terminal
sudo a2enmod rewrite
sudo gedit /etc/apache2/apache2.conf

=> Add below code
<Directory "/var/www/html"> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory>

All 29 comments

@Elsharif please check your env.php file for the correct backend name. Also, did you run 'bin/magento setup:static-content:deploy ? Also can you verifymod_rewrite` is enabled?

@mazhalai Sorry for delay, I was traveling .. Today I'll check it and back to you.
Thanks

@mazhalai I checked mod_rewrite in Apache, I found it disable .. I enabled it .. restart the server, Now the website work fine but I'm still can not access to the backend page .. when I tring to access to it, the browser given me this error "This webpage has a redirect loop"

I also checked the env.php file, the backend name is correct " 'frontName' => 'admin',"

when I point to :
"http://localhost:8888/vitrena/admin/" to access to the backend,

The browser redirect me to "http://localhost:8888/vitrena/admin/admin/index/index/key/4e4e58f07f07cb5cfaa9cb561e66b664ba625ee431b3e6ace6b72d815b2e9174/"
And show me the error message "This webpage has a redirect loop"

Note: I change the key during Magento installation to "absivi"

Thanks in advance
Abdusalam,

@Elsharif you probably already tried this, but did you clean cache? bin/magento cache:clean and `bin/magento cache:flush. Also clean your browser cache.

@mazhalai I appreciate your quick reply,
I empty the var/cache & var/page_cache and I clear the browser cache, But I'm still getting the same error.

Abdusalam.

@Elsharif Try to reinstall Magento using virtual host or at least 127.0.0.1. Cookies do not work when base URL is set to localhost.

@mazhalai @paliarush According to this solution : http://magento.stackexchange.com/questions/63117/magento-2-problem-in-admin-login

After I followed the steps in the solutions and try to open admin page, when I opened the it from Safari browser, I can successfully access to the admin control, But when I try to open it from Chrome browser they show me the same error "This webpage has a redirect loop" .. I cleared the Chrome cache but the problem not solved.

Any suggestions ?

Thanks in advance.
Abdusalam.

@Elsharif problem is with using localhost on chrome, since cookies are not set correctly. Please read this article: http://alankent.me/2015/04/25/use-of-localhost-when-installing-magento-2-quick-note/

I have same problem as @Elsharif but I didn't change anything (like keys or something else). Just admin url to simple /admin without underscore...
@mazhalai - for me not working on Firefox, too.
@Elsharif - Did you solve it?

@dusanmisic you mean you have a redirect loop on Firefox? Or some other error?

magento2-problem

@mazhalai No redirect loops, just 404 Not Found

My configuration:
Ubuntu 15.04;
PHP Version 5.6.4-4ubuntu6.4;
MySQL 5.6.25-0ubuntu0.15.04.1;

Thanks for advice

@dusanmisic I'm still stuck in the same problem :(

@Elsharif can you please confirm if you are using a virtual host and not localhost

@dusanmisic can you try the following, in app/etc/env.php, change backend_frontname to something other than admin for example, my_admin. Clean browser cache as well as magento cache, and then go to magento4.dev/my_admin on browser.

@dusanmisic @Elsharif please check apache logs: are there any error messages? Also, clean browser cache as well as magento cache.

I have same problem.
@mazhalai, your comments didn't work for me.

Apache says:
::1 - - [29/Dec/2015:00:46:12 +0200] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.4.6 (CentOS) PHP/7.0.0 (internal dummy connection)"

I have same problem.
pls help me ?

http://127.0.0.1/mage2/admin/admin/index/index/key/45cede1ed1f61621f86246f71918c4d762db2be719fc9446e63b436fdfd3e5bf/

Not Found

The requested URL /mage2/admin/admin/index/index/key/45cede1ed1f61621f86246f71918c4d762db2be719fc9446e63b436fdfd3e5bf/ was not found on this server.

Apache/2.4.7 (Ubuntu) Server at 127.0.0.1 Port 80

I have same issue as well. I cannot log in with chrome, even after clearing all cache's. Only firefox works for me, but after loging in via firefox I get this message in info box "One or more indexers are invalid. Make sure your Magento cron job is running.". Could someone help with it?

I am working on OSX El Capitan, PHP 5.6.1, MySql 5.6.25 on MAMP PRO.

@mazhalai fixed that problem, problem is var/gen file permission and change the core_config_data table value.
config_id = 1 that value updated 1 to 0.

after that clear the cache. now working.

and one more in problem my custom payment method it not showing in frontend payment.

@poongud please create new issue for that.

yes created.

* Remove index.php from url *
Run Command In Terminal
sudo a2enmod rewrite
sudo gedit /etc/apache2/apache2.conf

=> Add below code
<Directory "/var/www/html"> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory>

thanks it worked

@Elsharif is this still an issue?

Facing the same issue. Cleared cache and made all the changes suggested here but did not work.

Any body found any solution to this problem so far?

@Elsharif closing due to non-responsiveness

Probably you didn't copy _.htaccess_ file to your installation folder (and probably few other hidden files):

.gitignore
.htaccess
.htaccess.sample
.php_cs.dist
.travis.yml
.user.ini

So on your Mac machine in terminal

defaults write com.apple.finder AppleShowAllFiles YES

Relaunch "Finder" (right click + Alt -> Relaunch)
Grab your hidden files and put them into core folder.

@Viktorminator Thanks, It work for me.

@mazhalai fixed that problem, problem is var/gen file permission and change the core_config_data table value.
config_id = 1 that value updated 1 to 0.

after that clear the cache. now working.

I faced the same problem in Magento 2.3.5 fixed it by changing this by using
SELECT * FROM core_config_data WHERE path = 'web/seo/use_rewrites'
and change the value from 1 to 0

Was this page helpful?
0 / 5 - 0 ratings