title: Redirect to URL in ASP CORE
body: <p>I have problem with redirect to another controler and action in application.</p>
  
  <p>My Redirect Action look like:</p>
  
  <pre><code>    public IActionResult Redirect(NotificationItemViewModel model)
      {
          NotificationItemToggleReadCommand command = new NotificationItemToggleReadCommand();
          command.Id = new EntityId(model.Id);
          command.MarkAsRead = true;
  
  
          var result = CommandProcessor.Run(command);
          RedirectResult redirectResult = new RedirectResult(model.Subject.Url,true);
          return redirectResult;
      }
  </code></pre>
  
  <p>My model.Subject.Url is for example in this format : <code>Identity/User#/Details/b868b08c-b3ba-4f45-a7b6-deb02440d42f</code></p>
  
  <p>It's area/controller/action/id.
  Problem is that my RedirectResult redirect me to:</p>
  
  <pre><code>notifications/Identity/User#/Details/b868b08c-b3ba-4f45-a7b6-deb02440d42f 
  </code></pre>
  
  <p>and that route doesn't exist (controller/area/controller/action/id)
  How can force this redirect to cut off the first this controller name?</p>
  
  <p>My routes:</p>
  
  <pre><code>    app.UseMvc(routes =&gt;
          {
              routes.MapRoute("areaRoute", "{area:exists}/{controller}/{action=Index}/{id?}");
  
              routes.MapRoute(
                  name: "controllerActionRoute",
                  template: "{controller}/{action}",
                  defaults: new { controller = "Home", action = "Index" },
                  constraints: null,
                  dataTokens: new { NameSpace = "default" });
  
              routes.MapRoute(
                  name: "default",
                  template: "{controller=Home}/{action=Index}/{id?}");
          });
      }
  </code></pre>
  
  <p>Thanks for help.</p>