Closed mdmoura closed 6 years ago
I am trying to do the following in ASP.NET Core 2.0:
I added the following to Startup:
rewriteOptions .AddRedirectToHttps() .AddRedirect("^(https?://)(?!www[.])(.*)$", "$1www.$2");
The redirect to HTTPS is working but Non WWW to WWW is not working.
Am I missing something?
Is there a predefined way to redirect Non WWW to WWW and BTW also WWW to Non WWW?
I think this would be a really useful feature.
Closing as a duplicate of https://github.com/aspnet/BasicMiddleware/issues/194, https://github.com/aspnet/BasicMiddleware/pull/297
I am trying to do the following in ASP.NET Core 2.0:
I added the following to Startup:
The redirect to HTTPS is working but Non WWW to WWW is not working.
Am I missing something?
Is there a predefined way to redirect Non WWW to WWW and BTW also WWW to Non WWW?
I think this would be a really useful feature.