I am getting a 404 error when trying to go to my admin page was working fine earlier today. Haven't changed anything since I last logged in and the only thing I was doing was assigning products to categories.
http://mytempsite.net/gotie/admin
WHAT IVE TRIED SO FAR
Delete the following file:-
app/etc/use_cache.ser <-- I could not find the file in ftp or ssh
then tried doing this
Opened PhpMyAdmin
- Went to my database
- Clicked SQL
- Ran 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;
The problem is in getting of REQUEST_URI environment variable value and checking it withSCRIPT_FILENAME and SCRIPT_NAME environment variables values.
So a cause of the problem is in adding of /index.php/ prefix to the request path and the Magento url generation has this value hardcoded for admin.
Override method called _updatePathUseRewrites in /app/code/core/Mage/Core/Mode/store.php file : Replace this Function:
protected function _updatePathUseRewrites($url)
{
if ($this->isAdmin() || !$this->getConfig(self::XML_PATH_USE_REWRITES) || !Mage::isInstalled()) {
$url .= basename($_SERVER['SCRIPT_FILENAME']).'/'; }
return $url;
}
with
protected function _updatePathUseRewrites($url)
{
if ($this->isAdmin() || !$this->getConfig(self::XML_PATH_USE_REWRITES) || !Mage::isInstalled()) {
$url .= '/'; }
return $url;
}
This will definitely solve your Problem
Did you delete your .htaccess file in root of your website?
Try clearing your cache. Delete all files in var/cache/.
Also clear your browser's cache.