Forum Discussion

6 Replies

  • You can use the following irule to do that:

    when HTTP_REQUEST {
       HTTP::redirect https://[HTTP::host]/mobile/cplogin.aspx
    } 
    
  • Are you sure about that '@'? Anyway, assuming it should be a period '.';

    when HTTP_REQUEST {
     if { [HTTP::uri]] equals "/" } {
     HTTP::redirect https://[[HTTP::host]]/mobile/cplogin.aspx }
    }
    
  • Try this:

    when HTTP_REQUEST {
        if { [HTTP::uri] equals "/" } {
            HTTP::redirect "https://[HTTP::host]/mobile/cplogin.aspx"
        }
    }
    

    Do you specifically mean "[email protected]", with an ampersand in the URL?

  • This essentially means "if the URI is blank (you didn't enter a URI in the request), the redirect to the /mobile URI". If you don't specify a URI in the request, it will always at the very least equal "/". You need a conditional check like this to prevent a loop.