How about adding one new route before your current route which will be like this.
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index",
id = UrlParameter.Optional }
);
new route will be like this -
routes.MapRoute(
name: "**Withoutparam**",
url: "{controller}/{action}",
defaults: new { controller = "Home", action = "Index" }
);
Please note that you need to add this route before your current route in RouteConfig.cs. This is because MVC starts searching routes in RouteConfig file from top to bottom. As soon as it finds any matching route it will stop searching further. So for your problem when there will be route without param it will pick "Withoutparam" route.
As I can understand from your comment below. You need url without id in every condition. If it's so, then I think you can do this: -
var url = new StringBuilder();
string[] partOfUrl = HttpContext.Request.Url.AbsolutePath.ToLower().split('/');
for(int count = 0; count< (partOfUrl.Length - 1); count++)
{
url.Append(partOfLength[count] + "/")
}
use url.ToString() as url which you want.