I've written a few rules for our static content subdomain so that when they come to IIS, they redirected them to our www Will go Subdomain
The reason for this is that there are many subdomains indexed by Google, however, when I create the URL, I am still able to see the file at img1.mydomain.com, the condition of the 200 Instead of 200, as I expect.
Am I doing something wrong?
& lt ;! - www to indicate Force IMG domain and non-www user. - & gt; & Lt; Rule name = "Redirect images and nonvov" stop processing = "True" & gt; & Lt; Mail url = ". *" * / / Gt; & Lt; Conditions & gt; & Lt; Input = "{HTTP_HOST}" pattern = "^ img1.mydomain.com $" /> Add & lt; Input = "{HTTP_HOST}" pattern = "^ img2.mydomain.com $" /> Add & lt; Input = "{HTTP_HOST}" pattern = "^ img3.mydomain.com $" / & gt; Add & lt; Input = "{HTTP_HOST}" pattern = "^ js1.mydomain.com $" /> Add & lt; Input = "{HTTP_HOST}" pattern = "^ js2.mydomain.com $" /> Add & lt; Input = "{HTTP_HOST}" pattern = "^ js3.mydomain.com $" /> Add & lt; Input = "{HTTP_HOST}" pattern = "^ mydomain.com $" /> Add & lt; / Status & gt; & Lt; Action Type = "Redirect" url = "www.mydomain.com/{RCK}" Redirect = "Standing" /> & Lt; / Rules & gt;
Update: It appears that I was recalling the logical grouping flag, which defined my rules as "match all" .
& lt; Rule name = "redirect to WWW" stopProcessing = "true" & gt; & Lt; Mail url = ". *" * / / Gt; & Lt; Conditions Logical Group = "Matching" & gt; & Lt; Input = "{HTTP_HOST}" pattern = "^ mydomain.com $" /> Add & lt; Input = "{HTTP_HOST}" pattern = "^ img1.mydomain.com $" /> Add & lt; Input = "{HTTP_HOST}" pattern = "^ img2.mydomain.com $" /> Add & lt; Input = "{HTTP_HOST}" pattern = "^ img3.mydomain.com $" / & gt; Add & lt; Input = "{HTTP_HOST}" pattern = "^ js1.mydomain.com $" /> Add & lt; Input = "{HTTP_HOST}" pattern = "^ js2.mydomain.com $" /> Add & lt; Input = "{HTTP_HOST}" pattern = "^ js3.mydomain.com $" /> Add & lt; / Status & gt; & Lt; Action Type = "Redirect" url = "http://www.mydomain.com/{RCK}" Redirect = "Standing" /> & Lt; / Rules & gt;
The question is now answered.
It seems that I was recalling the logical grouping flag, which was setting my rule on "MatchAll".
& lt; Rule name = "redirect to WWW" StopProcessing = "true" & gt; & Lt; Mail url = ". *" * / / Gt; & Lt; Conditions Logical Group = "Matching" & gt; & Lt; Input = "{HTTP_HOST}" pattern = "^ mydomain.com $" /> Add & lt; Input = "{HTTP_HOST}" pattern = "^ img1.mydomain.com $" /> Add & lt; Input = "{HTTP_HOST}" pattern = "^ img2.mydomain.com $" /> Add & lt; Input = "{HTTP_HOST}" pattern = "^ img3.mydomain.com $" / & gt; Add & lt; Input = "{HTTP_HOST}" pattern = "^ js1.mydomain.com $" /> Add & lt; Input = "{HTTP_HOST}" pattern = "^ js2.mydomain.com $" /> Add & lt; Input = "{HTTP_HOST}" pattern = "^ js3.mydomain.com $" /> Add & lt; / Status & gt; & Lt; Action Type = "Redirect" url = "http://www.mydomain.com/{RCK}" Redirect = "Standing" /> & Lt; / Rules & gt;
Comments
Post a Comment