Forum Discussion

Muthu_108845's avatar
Muthu_108845
Icon for Nimbostratus rankNimbostratus
Aug 12, 2015

URL string redirection irule needed

_https://xxx.xxx.com/eysso/sso_login.aspx?DeepLinkKey=66091484-1e26-46ba-8574-b2d659de9c6f to this: _https://xxx.xxx.com/eygsso/sso_login.aspx?DeepLinkKey=66091484-1e26-46ba-8574-b2d659de9c6f

 

And if so, can it redirect//eyfs.intellinex.com/eysso only when ?DeepLinkKey=<whatever> is present in the URL string?

 

Meaning that this URL string (below) would not be touched by the rule, and would pass through normally:

 

_https://eyfs.intellinex.com/eygsso/sso_login.aspx

 

As would

 

_https://eyfs.intellinex.com/eysso/sso_login.aspx

 

1 Reply

  • Yes. This is untested, but should at least get you moving in the right direction:

    when HTTP_REQUEST {
        if { [string tolower [HTTP::host]] eq "xxx.xxx.com" and [HTTP::path] starts_with "/eysso" and [HTTP::query] contains "DeepLinkKey" } {
            HTTP::redirect "https://[HTTP::host]/eygsso/[string range [HTTP::uri] 7 end]"
        }
    }