The pattern is a regex, so you need to make it not match your dev-environment.
You could add your first one, to a config transform for your live environment. That is what I usually do, because then I can have the rule on my baseline project, and only need to change the redirect url.
You could also add a ^ to your HTTP_HOST pattern. This means, that the host must start with the pattern..
Quick note to help others because it caught me out with a recent deployment. If your dev environment starts redirecting to live automatically check if you have a redirect like this.
Umbraco Cloud - Redirect
Hi Our! :)
Hope you guys can help me with some redirects which i'm not the best at.. :)
I have an Cloud project with two envirements, live and dev :)
https://anders-s-sensitive-beaver.s1.umbraco.io/
https://dev-anders-s-sensitive-beaver.s1.umbraco.io/
I want to redirect the live envirement to my actual domain, but keeping the dev envirement.
This one redirects everything.. So i tried reconfigure it to this,
But it still wont work like i want to, how is i supposed to do?
Hi Anders
The pattern is a regex, so you need to make it not match your dev-environment.
You could add your first one, to a config transform for your live environment. That is what I usually do, because then I can have the rule on my baseline project, and only need to change the redirect url.
You could also add a
^
to yourHTTP_HOST
pattern. This means, that the host must start with the pattern..Thanks alot Søren :)
Quick note to help others because it caught me out with a recent deployment. If your dev environment starts redirecting to live automatically check if you have a redirect like this.
If so do not forget to update it to cope with the new DNS names for Umbraco Cloud projects
becomes:
Alternately you could do it properly with transforms to only add the redirect rule on the live environment - instructions are here: https://our.umbraco.com/documentation/Umbraco-Cloud/Set-Up/Config-Transforms/
is working on a reply...