Magento admin URL not working: 404 after changing it, can’t go back

http-status-code-404magento

I've been looking through all the topics to find something similar to my case. I've found a few similar cases, but none of the solutions solved my problem.

I changed through the backend the admin url. After saving changes, magento took me directly to a 404 error. The new url I defined for the admin url was "gestion". Going to mydomain.com/gestion, gets a 404 error.

So I decided to go back deleting the new entries that were created on the magento core_config_data table and then emptied manually the cache directory.

But after that I've got the same error: 404 page not found. I've tried this and this. But still the same.

The weird thing is that I've deleted everything related to "gestion" on the database and also emptied the cache directory. But when I go to mydomain.com/admin, magento redirects my to mydomain.com/gestion (with a 404 error).

Why is magento redirecting me to "gestion" when I've removed everything related to that? Where else should I look to solve this?

P.D. Magento 1.5.1

Best Answer

ANSWER: I had the same issue and none of previous answers worked for me. I'm using Magento Version 1.9.

Here's what i did to fix the issue...

  1. Go to your cpanel and launch phpMyAdmin.
  2. Locate your Magento Database and select the core_config_data table.
  3. Locate and edit the following rows:
    • Scope:"Default" and Path:"admin/url/custom"
      • Select the NULL checkbox and save.
    • Scope:"Default" and Path:"admin/url/use_custom"
      • Change value from 1 to 0 and save.
    • Scope:"Default" and Path:"admin/url/use_custom_path"
      • Change value from 1 to 0 if it isn't already and save.
  4. Locate and delete the following rows:
    • Scope:"Stores" and Path:"web/secure/base_url"
    • Scope:"Stores" and Path:"web/unsecure/base_url" (should be located on the last page)
  5. Delete /var/cache folder

and you're DONE!

go to your previous admin url and it should work!

Related Topic