Url reweite or the router help me

.ner core2.1 url rewrite i want use the seo
the project URL:
/Home
/Home/
/Home/Index
/Home/Index/Id

after rewrite Url
/Home
/Home
/Home-Index
/Home-Index-Abc

the code:
Url Rewrite:
var options = new RewriteOptions() //.Add(new RedirectWwwRule());
.AddRedirect(@"(.)/(.)", “$1-$2”, 302).AddRedirect(@"(.)/(.)/(.*)", “$1-$2-$3”, 302);
app.UseRewriter(options);
the router
app.UseMvc(routes =>
{
routes.MapRoute(
name: “default1”,
template: “{controller=home}-{action=Index}-{par}”);
});

        app.UseMvc(routes =>
        {
            routes.MapRoute(
                name: "default",
                template: "{controller=Home}/{action=Index}/{id?}");
        });

i can’t visit /home/ ,it’s rewrite /home-

.NET Foundation Website | Blog | Projects | Code of Conduct