cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Admin URL causes 404. How can I get back in to admin?

SOLVED

Custom Admin URL causes 404. How can I get back in to admin?

I set a custom Admin URL in System Config & then saved the config. I was immediately kicked out to a 404 Page not found, and now I cannot get back into by backend. I tried the URL value that I set, as well as the previous versions that worked before ({MY_SITE}/index.php/admin & {MY_SITE}/admin). How can I get back into the admin panel? 

 

Thank you in advance for any help!

2 ACCEPTED SOLUTIONS

Accepted Solutions

Re: Custom Admin URL causes 404. How can I get back in to admin?

Hello,

It is not recommended to use the web interface to change your admin URL after the initial install.

Try the following.

Visit your local.XML which will be in app/etc

Find:
<admin>
<routers>
<adminhtml>
<args>
<frontName><![CDATA[admin]]></frontName>
</args>
</adminhtml>
</routers>
</admin>
The [admin] section will be your URL.

Update this, refresh your browser cache. See if it works.

Freelance Web Developer - Graphic Designer - SEO Analyst
Conor Rhys Tomkins

View solution in original post

Re: Custom Admin URL causes 404. How can I get back in to admin?

If you have access to the DB, the following should undo the changes assuming no custom URL was set before:

 

UPDATE `core_config_data`
SET `value` = 0
WHERE `path` = "admin/url/use_custom"
LIMIT 1;

DELETE FROM `core_config_data`
WHERE `path` = "admin/url/custom";

 Disclaimer: no warranty implied, always back up your DB, etc.

-----
@benmarks, Senior Manager, Strategy & Growth

View solution in original post

10 REPLIES 10

Re: Custom Admin URL causes 404. How can I get back in to admin?

Hello,

It is not recommended to use the web interface to change your admin URL after the initial install.

Try the following.

Visit your local.XML which will be in app/etc

Find:
<admin>
<routers>
<adminhtml>
<args>
<frontName><![CDATA[admin]]></frontName>
</args>
</adminhtml>
</routers>
</admin>
The [admin] section will be your URL.

Update this, refresh your browser cache. See if it works.

Freelance Web Developer - Graphic Designer - SEO Analyst
Conor Rhys Tomkins

Re: Custom Admin URL causes 404. How can I get back in to admin?

If you have access to the DB, the following should undo the changes assuming no custom URL was set before:

 

UPDATE `core_config_data`
SET `value` = 0
WHERE `path` = "admin/url/use_custom"
LIMIT 1;

DELETE FROM `core_config_data`
WHERE `path` = "admin/url/custom";

 Disclaimer: no warranty implied, always back up your DB, etc.

-----
@benmarks, Senior Manager, Strategy & Growth

Re: Custom Admin URL causes 404. How can I get back in to admin?

Thank you for your quick reply, Conor Tomkins. Unfortunately that did not work though.

Re: Custom Admin URL causes 404. How can I get back in to admin?

Thank you, Ben Marks!! That worked!

 

Also, I tried Conor's suggestion above and that DID end up working after refreshing Magento's Page Cache (in adition to browser cache). Thank you so much!

Re: Custom Admin URL causes 404. How can I get back in to admin?

I tried both items and still cannot get back in.

Is there a way to flush the magento cache from shell other than wiping the cache dir?

 

update: I found the issue, apparently web/secure/base_url and web/unsecure/base_url also had gotten updated when

setting the new admin url. I removed the custom url off the end and it worked ok. (changed in core_config_data in mysql db)

Re: Custom Admin URL causes 404. How can I get back in to admin?

If you're using memcache, make sure to purge the cache by restarting the memcache daemon or telneting into the host ip and issuing the flush_all command. If using file cache, delete the var/cache files. It all depends on the cache method you selected in your local.xml.

Re: Custom Admin URL causes 404. How can I get back in to admin?

This worked For me.

Thanks

Re: Custom Admin URL causes 404. How can I get back in to admin?

This Method Worked for me.
Thanks you

Re: Custom Admin URL causes 404. How can I get back in to admin?