Forum Discussion

Pawan_Goswami's avatar
Pawan_Goswami
Icon for Nimbostratus rankNimbostratus
Nov 09, 2017

Redirection Help required

The objective is to redirect browsers hitting the

 

URI https://xxx.net.au to the URI https://xxx.net.au/CHP/Navigator

 

I tried all the below mentioned three I-rule, but not exactly working anything.. it's giving below error when i checked https://xxx.net.au and redircting to https://xxx.net.au/CHP only

 

This site can’t be reached xxx.net.au refused to connect. Search Google for xxx net au CHP

 

ERR_CONNECTION_REFUSED

 

1. when HTTP_REQUEST { if { [HTTP::host] equals "xxx.net.au" } { HTTP::redirect "https://xxx.net.au/CHP/Navigator"; } }

 

2. when HTTP_REQUEST { if { [HTTP::uri] equals "/" || [HTTP::uri] equals "" } { HTTP::redirect "/CHP/Navigator" } }

 

3. when HTTP_REQUEST { if { [HTTP::uri] equals "/" } { HTTP::redirect "/CHP/Navigator" } }

 

2 Replies

  • JG's avatar
    JG
    Icon for Cumulonimbus rankCumulonimbus

    If the following does not work:

        when HTTP_REQUEST { 
        if { [string tolower [HTTP::host]] equals "xxx.net.au" } {
            switch -exact [HTTP::uri] {
                "/" {
                        HTTP::redirect "/CHP/Navigator"
                }
                "" {
                        HTTP::redirect "/CHP/Navigator"
                }
            }
        }
    }
    

    then you might have a problem with the site https://xxx.net.au/CHP/Navigator itself. Does this URL work when accessed directly?

  • JG's avatar
    JG
    Icon for Cumulonimbus rankCumulonimbus

    chpdev.news.net.au does not resolve to an IP address, from my testing.