we are new to MWG and are trying to do a redirect of domain from mydomain.com to www.mydomain.com
Criteria: URL matches *://mydomain.com*
Action: Redirect <www.mydomain.com>
what we trying to achieve is to redirect any of the follow example below and retaining the original path to www.mydomain.com:
Solved! Go to Solution.
Most likely you are doing the "Redirect" before SSL Inspection applied, so MWG does not see the path. You can check in a rule trace If you see the redirect action, check on what URL the redirect action is called.
If it is https://url.com/path, then the problem is with the rules. If you see the redirect called for https://url.com then MWG does not know the path yet, so it cannot redirect to the path. In this case make sure you do SSL inspection first.
yes. When SSL Inspection is done there is a CONNECT request sent to the proxy first, which only contains https://www.url.com (note the missing path information!). This request hits the SSL Inspection rule set. If the policy is finished, the next request coming in is the GET request that is sent within the SSL connections, such as https://www.url.com/path (note the existing path).
I bet the rule has some criteria which makes it call the "redirect" action for the CONNECT request. In this case, the path is not available.
Without knowing the rule set in detail, you can try to extend the rules criteria to execute it only if String.IsEmpty(URL.Path) eq false. In this case the rule is only doing the redirect when the URL.Path is not empty, so it won't apply for the CONNECT request.