Question

I can't open the backend on my local project. The file app/etc/local.xml has this entry:

...
<admin>
    <routers>
        <adminhtml>
            <args>
                <frontName><![CDATA[login]]></frontName>
            </args>
        </adminhtml>
    </routers>
</admin>
...

But if I enter http://project.local/login then I get 404 page not found.

What is going on?

Was it helpful?

Solution

I solved it by executing this code:

SET FOREIGN_KEY_CHECKS=0;
UPDATE `core_store` SET store_id = 0 WHERE code='admin';
UPDATE `core_store_group` SET group_id = 0 WHERE name='Default';
UPDATE `core_website` SET website_id = 0 WHERE code='admin';
UPDATE `customer_group` SET customer_group_id = 0 WHERE customer_group_code='NOT LOGGED IN';
SET FOREIGN_KEY_CHECKS=1;

I actually had to change the table names, because I am using the prefix "mage" defined in app/etc/local.xml.

SET FOREIGN_KEY_CHECKS=0;
UPDATE `magecore_store` SET store_id = 0 WHERE code='admin';
UPDATE `magecore_store_group` SET group_id = 0 WHERE name='Default';
UPDATE `magecore_website` SET website_id = 0 WHERE code='admin';
UPDATE `magecustomer_group` SET customer_group_id = 0 WHERE customer_group_code='NOT LOGGED IN';
SET FOREIGN_KEY_CHECKS=1;

Then I had to clear the cache by deleting the content in /var/cache

Solution found here.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top