If you are one of those users, this article is for you. Store admins or developers who wish to change the default admin URL of nopCommerce administration section should follow these steps.
The default admin panel URL is: www.YourDomain.com/Admin
Go to: Nop.Admin (or Nop.Web\Administration) \ AdminAreaRegistration.cs
Open the "AdminAreaRegistration.cs" file and locate the following code:
public override void RegisterArea(AreaRegistrationContext context)
{
context.MapRoute(
"Admin_default",
"Admin/{controller}/{action}/{id}",
new { controller = "Home", action = "Index", area = "Admin", id = "" },
new[] { "Nop.Admin.Controllers" }
);
}
If you look closely, you will that the word "Admin" is defined in this "RegisterArea" method. So, if you change it to something else, the change should reflect in the admin URL too.
Now, update your code like this:
public override void RegisterArea(AreaRegistrationContext context)
{
context.MapRoute(
"Admin_default",
"AdminUser101zz09811/{controller}/{action}/{id}",
new { controller = "Home", action = "Index", area = "Admin", id = "" },
new[] { "Nop.Admin.Controllers" }
);
}
Rebuild the solution, run your website and try going to the administration section (by default URL), you should see this error:
Now, if we try to go to the new URL: www.YourDomain.com/AdminUser101zz09811
It is certainly not easy for anyone to figure out or guest the admin URL "AdminUser101zz09811".
Hope it helps!
A copy of this article is also available on Arvixe Blog.