I don't think there is a way to do this without removing the routers
tag from the config.xml
or adding some observers on the predispatch event that will redirect you to a 404 page.
But I may be wrong. In case I'm wrong here is a place to start.
The routers
section of the config.xml
files is parsed in Mage_Core_Controller_Varien_Router_Standard::collectRoutes
.
From what I saw in there, there is no check for a disabled
flag or something like that.
There might be a chance if the the module does not use the admin
path for backend pages.
So if the router is not declared like this:
<routers>
<adminhtml>
<args>
<modules>
<Module_Name before="Mage_Adminhtml">Module_Name_Adminhtml</Module_Name>
</modules>
</args>
</adminhtml>
</routers>
but uses the other way of declaring routers:
<routers>
<module_name>
<use>admin</use>
<args>
<module>Module_Name</module>
<frontName>route_name</frontName>
</args>
</module_name>
</routers>
You can create a module and just change the <use>
tag value to something that's not admin
or standard
.
So your new module that depends on the original one can have the routers section like this:
<routers>
<module_name>
<use>go-away</use>
</module_name>
</routers>
Why I thing it could work? because in the method mentioned above the only if
with no else
that could return false is if ($use == $useRouterName)
.
This is just an assumption. I haven't tested it. I don't have any extensions that use this type of routers for backend.