Trouble with http to https and non-www to www redirects
Hi,
I'm using Umbraco 7.2 and am having some trouble with http to https and non-www to www redirects. We have several URLs matching different nodes in the Umbraco content tree using the hostnames and culture options like this:
But unfortunately it's not working as intended. It seems to be working for one of the domains but only when using non-https so not quite sure what gives.
Would very much appreciate any help on how to solve this or if there's any errors in the above rules.
Trouble with http to https and non-www to www redirects
Hi,
I'm using Umbraco 7.2 and am having some trouble with http to https and non-www to www redirects. We have several URLs matching different nodes in the Umbraco content tree using the hostnames and culture options like this:
Top-level node 1 - matches sitename.se
Top-level node 2 - matches sitename.com
Top-level node 3 - matches othersite.se
We want to setup redirect rules to force https and www-domains so that either of
http://sitename.se
,http://www.sitename.se
orhttps://sitename.se
becomeshttps://www.sitename.se
for each domain respectively (ie.http://sitename.com
becomeshttps://www.sitename.com
). We'd like to do this dynamically as more domains might be used later on for localisation support.We're currently have the following 2 rules setup in UrlRewriting.config:
But unfortunately it's not working as intended. It seems to be working for one of the domains but only when using non-https so not quite sure what gives.
Would very much appreciate any help on how to solve this or if there's any errors in the above rules.
Hi Mortimer
Welcome to our forum!!!
Maybe it makes sense to use rewrite rules?
UrlRewriting is removed from latest Umbraco versions, we are using these rules for redirects to www, https or non-www:
Thanks,
Alex
Thanks for the help!
Is there any way to do this without specifying the domain name? Tried modifying similar code myself to do this without any luck.
Hi Mortimer
You can use {REQUEST_URI} token instead of the domain in rewrite rules, have a look at examples here:
https://host4asp.net/top-iis-rewrite-rules/
Thanks,
Alex
is working on a reply...