Forum Discussion

flypast's avatar
Icon for Altostratus rankAltostratus
Jun 27, 2011

replace irule with HTTP redirect-rewrite




We have one appplication ruuning as the way below:



client---proxy(443)----(Port 443) F5----------(Port 8443) real server.



SSL is running:



between client and proxy on port 443


between proxy and F5 on port 443


Between proxy and real server on port 8443




We developed one irule as below for HTTP redirect rewrite;







Check if server response is a redirect


if { [HTTP::header is_redirect]} {


Log original and updated values


log local0. "Original Location header value: [HTTP::header value Location],\


updated: [string map ":[TCP::remote_port]/ /" [HTTP::header value Location]]"


Do the update, replacing :8443/ with / (where 8443 is the pool member's port)


HTTP::header replace Location [string map ":[TCP::remote_port]/ /" [HTTP::header value Location]] }



As somebody advised that HTTP redirect-rewrite can do the same thing.



So we create a HTTP profile which change redirect-rewrite option to "ALL".



But it looks like the application doesn't like the HTTP profile at all.



Anybody can help to give me a clue why HTTP profile doesn't work the same way as irule?




Thank you very much!!

3 Replies

  • You might be running a version of LTM with a bug in the HTTP profile option. Which LTM version are you running?



    The iRule shouldn't be that much less efficient than the profile option anyhow. If you wanted to troubleshoot this, you could open a case with F5 Support.



  • hi hoolio,




    Thank you very much for your reply.



    The version is 10.2


  • You can use a browser plugin like HttpFox for Firefox or Fiddler2 with any browser to view the headers being sent back by LTM and the app. If the HTTP profile rewrite option isn't rewriting the header correctly, you could open a case with F5 Support to get help with the issue.