Forum Discussion

aali86's avatar
Icon for Altostratus rankAltostratus
Aug 28, 2022


Dear Experts,

I have to redirect  URL to . once it is reach to user fill the survey form and submit then it will redirect to it is implement by application side. however if the HTTP header referer is it should not redirect if it doesn't macth it should redirect

How to implement this on irule

6 Replies

  • Hi aali86,

    Please try this irules for replace response content,


    when HTTP_REQUEST {
    HTTP::header remove "Accept-Encoding"

    when HTTP_RESPONSE {
    STREAM::expression {}


    Find more information: cloud-ttrust 



    • aali86's avatar
      Icon for Altostratus rankAltostratus

      Hi T-Trust

      I hope you understood my query unfortuntly i don't have  UAT enviroment 

      • T-Trust's avatar
        Icon for Cirrostratus rankCirrostratus

        Hi aali86,

        So i think if all traffic that go to redirect to and click the submit button, then application server response back to the client with content code that include, We can replace domain before sent to users, Please confirm about my understand



  • It is not clear what you want to do here - you need to explain the technical detail more.

    • Do you want to replace the Location header in a redirect?
    • Where does the Referer HTTP header come in?
    • Do you want to rewrite content sent from the backend server?

    If you can explain what you actually want to do, it should be simple enough to write an iRule. If you are not sure, maybe contact F5 Professional Services who can discuss your options, write an iRule, demonstrate it, etc 

    • aali86's avatar
      Icon for Altostratus rankAltostratus

      Hello Pete,

      Sorry, I was stuck in different activities hence i am unable to reply to your message.

      When user trying to access it is should redirect to

      Then, user will fill survey for which is made by sharepoint once user submit the survey. then sharepoint redirect to if the referrer match with for should not redirect i mean should not causing the issue.

      • PeteWhite's avatar
        Icon for Employee rankEmployee

        Maybe try this

        when HTTP_REQUEST {
          if { [HTTP::host] == " && ! [HTTP::has_responded] && [HTTP::header Referer] == ""} {
            HTTP::redirect ""

        If not, I suggest you contact F5 Professional Services