title: Redirect asp.net core 2.0 urls to lowercase
body: <p>I have seen that you can configure routing in ASP.NET Core 2.0 to generate lower case urls as described here: <a href="https://stackoverflow.com/a/45777372/83825">https://stackoverflow.com/a/45777372/83825</a></p>
  
  <p>Using this:</p>
  
  <pre><code>services.AddRouting(options =&gt; options.LowercaseUrls = true);
  </code></pre>
  
  <p>However, although this is fine to GENERATE the urls, it doesn't appear to do anything to actually ENFORCE them, that is, redirect any urls that are NOT all lowercase to the corresponding lowercase url (preferably via 301 redirect).</p>
  
  <p>I know people are accessing my site via differently cased urls, and I want them to all be lowercase, permanently.</p>
  
  <p>Is doing a standard redirect via RewriteOptions and Regex the only way to do this? what would be the appropriate expression to do this:</p>
  
  <pre><code>var options = new RewriteOptions().AddRedirect("???", "????");
  </code></pre>
  
  <p>Or is there another way?</p>