I have created a redirect rules in my web.config to redirect my website from http to https. The issue i have is that every single link on the website is now https. I have a
In ASP.NET Core 2.1 just use this:
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
else
{
app.UseExceptionHandler("/Error");
app.UseHsts(); // <-- Add this !!!!!
}
app.UseHttpsRedirection(); // <-- Add this !!!!!
app.UseStaticFiles();
app.UseCookiePolicy();
app.UseMvc();
}