13

We recently migrated our Multi-domain magento setup from a shared host to a dedicated server.

All is working fine fronted, but when I try to go to the admin section I get a 404 error on anything after login.

It seems to work if I remove index.php from the url but then as soon as I click on another link in the admin section it 404's again with the index.php back in the URL.

Vince P
  • 1,781
  • 7
  • 29
  • 67
  • I think that is a problem with the indexing and url rewrites. You will have to somehow manually reindex/ delete all old cache and rebuild everything. – Piotr Kula May 03 '11 at 15:02

5 Answers5

17

-- You need to go your server directly and do this via SSH/ FTP

You have to delete the following file

app/etc/use_cache.ser

If you get an error after that like

Notice: Undefined index: 0 in /srv/www/vhosts/javra.com/htdocs/munchad2/app/code/core/Mage/Core/Model/Mysql4/Config.php on line 92

Then go to your Database Management.

  • Open PhpMyAdmin
  • Go to your database
  • Click SQL
  • Run the following SQL Query:

_

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;

Some thing strange happens with the cache when you move the databases from one server to another so it seems like you need to clear it out.

Piotr Kula
  • 9,597
  • 8
  • 59
  • 85
  • can't get to any... i get the log in form but then 404 when i log in – Vince P May 03 '11 at 15:11
  • does it add the index.php after you log in?I think i had a similar problems once with this. and what version magento is it? and are you using custom skins? – Piotr Kula May 03 '11 at 15:23
  • Yeah... if i go to /admin I get the login screen as soon as i try to log in it adds the index.php to the URL. using a custom skin that was working fine on previous install on old shared server. Version 1.5.0.1 of magento – Vince P May 03 '11 at 15:28
  • there's no app/etc/use_cache.ser and I've also tried running the SQL query before with no luck. – Vince P May 03 '11 at 15:47
  • Sorry pal - that is all I got .. You going to have to dig in log files somewhere. – Piotr Kula May 03 '11 at 15:59
  • Thanks for all of your help on this, finally found out the problem, turned out to be an issue with a rogue .htaccess file! – Vince P May 06 '11 at 08:50
  • 3
    Could you possibly elaborate a bit and to add to the answer- for anybody in the future.. glad its sorted – Piotr Kula May 06 '11 at 08:59
  • 2
    Hi I had the same problem, and the reply with the "rogue .htaccess" file did not help at all.. What did help though, was this response: http://www.magentocommerce.com/boards/viewthread/488069/. The frontname in my local.xml was set to "system" for some strange reason. – Danyel May 15 '14 at 12:29
2

Check in this way

> http://www.yourstore.com/index.php/admin/

or

>  http://www.yourstore.com/admin/
blakcaps
  • 2,647
  • 10
  • 46
  • 71
  • going to index.php/admin/ does nothing and if i go to /admin/ I can get the log in form but it then goes through to a 404 with index.php/admin/ in the url – Vince P May 03 '11 at 15:08
  • All permissions are set to what they should be, still having problems – Vince P May 04 '11 at 13:14
1

After migration from www.domain1.com/magento/ to www.domain2.com/magento/ I was getting 500 Internal Server Error. So I just renamed my .htaccess to htaccess.txt. And my frontend started working fine, But at Backend http://www.yourstore.com/admin/ I was getting Same 500 Internal Server error.

After trying many option suggested online nothing worked for me and after that I tried to access admin via following URL and voilà worked perfect, Hope this help others.

Try to access as this > http://www.yourstore.com/index.php/admin/

TechYogi
  • 371
  • 3
  • 12
0

This is an old thread but I've also had an issue with ownership what was returning a 404 in admin. I'd been doing some work on securing the server and some files were owned as root, not apache. So a chown -R apache:apache . fixed it right up.

0

Does the dedicated server have mod_rewerite enabled? Does the apache configuration allow .htaccess files to make changes to configuration directives via AllowOverride? Both of those are common ways that the Magento config gets pooched up.

Joe Mastey
  • 26,809
  • 13
  • 80
  • 104