Forum Discussion

Veerender_Yadav's avatar
Veerender_Yadav
Icon for Nimbostratus rankNimbostratus
Jun 09, 2015

source should not change after redirecting

greetings

 

I have two domain's where source domain is redirected to destination domain and same visible on the web page when customer access. Here my request is redirection should take place but source domain address should not change on customer web page. Please help me out.

 

4 Replies

  • when HTTP_REQUEST {
      if {[string tolower[HTTP::path]] starts_with "/client-visible-path"}
        Overwrite HTTP path value, before routing the request to end-server.
        e.g mydomain1.com/client-visible-path/?login=true is overwritten to mydomain1.com/overwritten-path/?login=true
        HTTP::path "/overwritten-path"
      }
    }
    
    • Hannes_Rapp_162's avatar
      Hannes_Rapp_162
      Icon for Nacreous rankNacreous
      The method above is called "silent rewrite" which occurs after the client-side TCP connection is terminated, and before the request is routed to end-server via the server-side TCP connection. You can not invoke a redirect without making the new location visible to your client. For this solution to work for you, the new location should ideally be an applet that does not contain any HTML links (referring to original HTTP Path value).
  • when HTTP_REQUEST {
      if {[string tolower[HTTP::path]] starts_with "/client-visible-path"}
        Overwrite HTTP path value, before routing the request to end-server.
        e.g mydomain1.com/client-visible-path/?login=true is overwritten to mydomain1.com/overwritten-path/?login=true
        HTTP::path "/overwritten-path"
      }
    }
    
    • Hannes_Rapp's avatar
      Hannes_Rapp
      Icon for Nimbostratus rankNimbostratus
      The method above is called "silent rewrite" which occurs after the client-side TCP connection is terminated, and before the request is routed to end-server via the server-side TCP connection. You can not invoke a redirect without making the new location visible to your client. For this solution to work for you, the new location should ideally be an applet that does not contain any HTML links (referring to original HTTP Path value).