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
To solve this issue, reset the permission role of your administrator from Admin Panel> Systems> Permission> User Roles. Follow the below steps: Select the role name that needs to be edited. Switch to the 'Role Resources' menu.
Default Admin URL and Path: http://yourdomain.com/magento/admin.
Here's the fix for the System Config Custom Admin URL booby trap. It's never worked, and probably never will. The only way to change it is to change the route through local.xml
https://magento.stackexchange.com/a/40622/553
And for anyone who turns Admin Base URL on, here's a way to kill it before you do anything else which WILL mess your system up.
Fire up phpMyAdmin and open your core_config_data table. You have four or more rows to edit.
Find admin/url/custom and set to 0
The next three will have been set from the funky Admin Base URL you set in the Admin Config panel. You know what it is, the following rows will have it in the value field. Note their config_ID numbers and write them down.
admin/url/custom and all instances of web/unsecure/base_url web/secure/base_url
Set these to be what your website unsecured base url should be. Example: http://yourwebsite.com/ and don't forget the folder followed by a slash if you installed there.
EDIT: Flush /var/cache and /var/session.
This should allow you to log into your Admin panel now by appending /admin to your website url as like before you got adventurous. Go to your Advanced Admin setup. Use Custom Admin will be set to No. Clear the URL from the Custom Admin URL field and save. When you go back and check your core_config_data table in phpMyAdmin, you should only find the admin/url/custom row still set to 0, the admin/url/custom row blanked, and the other two rows gone as they were deleted through the admin panel save.
The reason for doing it this way is that you need to get the right web/unsecure/base_url and web/secure/base_url rows deleted. If you get the wrong ones, your website frontend gets completely disabled instead of just losing the admin backend.
EDIT: Now that you have your website back up, go back and make sure you have the correct secure_base_url to get your TLS/SSL capabilities back.
This has all been tested on a dev server, YMMV
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...
and you're DONE!
go to your previous admin url and it should work!
After trying everything to fix the problem I found out that the /var directory didn't have the correct permissions. Magento wrote on /tmp so there was no effect emptying the /var/cache directory on the magento root.
We fixed the permissions and flushed the /tmp directory and everything went back to normal. So, it was the /var permissions that caused the problem.
Now we have another thing to take into account when something like this happens.
Thanks for your help, guys.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With