I have several websites on one instance of Umbraco 7.2.8 on my server. They are all http sites and I'm upgrading them one at a time to https. I am trying to set a rule in the web.config for specific sites. This is my rule but it doesn't seem to work. greywell.info is the domain name that I want to changes from http to https:
And you're sure there's no other redirects for that domain somewhere? The reason I ask is I grabbed that straight out of production and just updated the domains based on the info you provided.
Using Chrome > inspect > Network and reloading the page, there were several https redirects, perhaps from images and documents on the page? I fixed it using the following rule for upperbridge.co.uk, which stops the redirect if the prefix is https://:
If I remove the http bindings from IIS, however, browsers that have not used https go to the IIS default page. I've left the http bindings in IIS so the page opens on http but will open on https if the https:// prefix is added. Searching on "Upper Bridge Enterprises" lists the https:// page.
As you can see you are matching all with for http_host value. Normally you want these conditions to cover correct parts and if you don't want your rule to be run when it is on https, you should add condition below. It would help you greatly if you have multiple domain names assigned.
<add input="{HTTPS}" pattern="off" />
You can consider this, without giving and domain names, you can actually redirect all into https, to same domain or each to its own.
Redirect to https
Hi everyone, I have installed Umbraco version 8.01 on Unoeuro.com. I set up the SSL certificate that is available and in Web.config changed this:
-- add key="Umbraco.Core.UseHttps" value="false" --
to this:
-- add key="Umbraco.Core.UseHttps" value="true" --
This works fine for backoffice.
However I would like to enforce https on Front-end as well but everything I tried turns into an error.
Does anyone have a great way to ensure and enforce http > https in version 8.01?
//Carsten - Denmark
You can add this to your webconfig or to a separate config file and reference that file from the web.config, documentation is here: https://our.umbraco.com/documentation/reference/routing/IISRewriteRules/
Thank you Amir, I will give it a go
//Carsten
I have several websites on one instance of Umbraco 7.2.8 on my server. They are all http sites and I'm upgrading them one at a time to https. I am trying to set a rule in the web.config for specific sites. This is my rule but it doesn't seem to work. greywell.info is the domain name that I want to changes from http to https:
What am I doing wrong? Your help would be much appreciated.
Thanking you in anticipation.
Roger
Something like this should work.
Thanks, Amir, but when I apply this rule I get "This page isn’t working, greywell.info redirected you too many times" in both Chrome and Edge
Hmm, no other redirects in there?
Maybe try changing conditions to:
Changed that but the same problem.
And you're sure there's no other redirects for that domain somewhere? The reason I ask is I grabbed that straight out of production and just updated the domains based on the info you provided.
Using Chrome > inspect > Network and reloading the page, there were several https redirects, perhaps from images and documents on the page? I fixed it using the following rule for upperbridge.co.uk, which stops the redirect if the prefix is https://:
If I remove the http bindings from IIS, however, browsers that have not used https go to the IIS default page. I've left the http bindings in IIS so the page opens on http but will open on https if the https:// prefix is added. Searching on "Upper Bridge Enterprises" lists the https:// page.
Hope this helps.
Roger
Heya,
It is great that you made it work but I guess there can be a small iteration.
Now this line matches for anything you see in the address bar.
After that comes condition, just one in your case.
As you can see you are matching all with for http_host value. Normally you want these conditions to cover correct parts and if you don't want your rule to be run when it is on https, you should add condition below. It would help you greatly if you have multiple domain names assigned.
You can consider this, without giving and domain names, you can actually redirect all into https, to same domain or each to its own.
Hope this helps.
Mehmet
is working on a reply...