Forum Discussion

Azad's avatar
Azad
Icon for Nimbostratus rankNimbostratus
Jun 07, 2020

redirection issue on irule code

Have created the irule for redirection from http://pfc-pp.prodactive/jkhg/#/ to pfc.pp.cloud, while redirecting to pfc.pp.cloud i could see # value is not removed

i get the result https://pfc.pp.cloud/#/ i want to remove as well # have to redirect to https://pfc.pp.cloud

 

can you please help me on this

 

 

when HTTP_REQUEST {

 

 if {[HTTP::uri] starts_with "/jkhg"} {

 

  HTTP::uri [string map {"/jkhg" ""} [HTTP::uri]]

 

  HTTP::respond 302 Location "https://pfc.pp.cloud[HTTP::uri]"

 

TCP::close

 

}

 

else {

 

HTTP::respond 302 Location "https://pfc.pp.cloud[[HTTP::uri]"

 

  TCP::close

 

}

 

}

3 Replies

  • Azad's avatar
    Azad
    Icon for Nimbostratus rankNimbostratus

    Thanks for sharing useful document, but their requirement to remove # as well when the URL redirect to cloud

  • as i said, i don't believe that # will be presented in the uri call (if the call is made by a browser) - have you been able to capture the requests coming in? can yu see the /#/ present in the request?