How to disable admin page?

Topics: Administration
Aug 7, 2012 at 3:19 PM

After publishing the site, I do not want anyone to go to admin page. What is the best way to deal with this? In simple words.. admin module should not get published on internet. 

Aug 8, 2012 at 3:54 PM

I don't know what the best way would be, but perhaps you could override the routes so that any request to /Users/Account gets redirected to another controller, e.g. your own controller that redirects to the homepage. You could implement this controller in such a way that only requests from the local machine are redirect to the login page.

Alternatively, you could try and see what happens if you remove the Orchard.Users module. If that causes problems, you may need to duplicate that module and change its implementation and see if that works out.

Aug 8, 2012 at 6:25 PM
Edited Aug 8, 2012 at 6:26 PM

Alternatively, you can rename the module.txt from the module 'Orchard.Web\Core\Dashboard' to module.tx_ (so that it's not module.txt anymore). Build and deploy, when you access /admin you'll get a 404 Page not found.

Aug 8, 2012 at 8:25 PM

Yeah, nice one.

Aug 8, 2012 at 8:26 PM

Unless one of the installed modules require a feature of the Users module of course.