URL redirection action from Proxy fails when site down
search cancel

URL redirection action from Proxy fails when site down

book

Article ID: 425880

calendar_today

Updated On:

Products

ProxySG Software - SGOS

Issue/Introduction

One corporate application changed from one URL location to another, where the domain for the originally hosted URL is no longer active or even resolvable via DNS.

Many users had bookmarked application URL on browser that sent them to the old URL, where they got an DNS error message.

ProxySG admin tried to generate a redirect rule that would redirect users from the original application URL to the new one using the CPL below, but this still failed with the DNS error.

;Force Redirect from example.com path to example2.com path (testing)
define action Returnredirect_test
   request_redirect( 302, ".*", "www.example2.com/example/path/example.aspx?abc=1" )
end

<Proxy>
Allow url=//example.com/ExampleApplicationPath/  action.Returnredirect_test(yes)

Tried with both the request_redirect and redirect actions without any difference.

Environment

ProxySG.

Redirect actions.

 

 

Cause

When using the redirect action with a path in the destination object, the proxy tries to go out to the server to confirm the path. If the destination host no longer online, this will fail.

Resolution

Make sure that the destination object does not use a path when it is no longer active. Using the URL domain approach, the proxy will simply generate a 302 redirect to the host/path specified without going upstream to check the OCS first.

;Force Redirect from example.com path to example2.com path (testing)
define action Returnredirect_test
   request_redirect( 302, ".*", "https://www.example2.com/example/path/example.aspx?abc=1" )
end

<Proxy>
url.domain=example.com action.Returnredirect_test(yes)