Forum Discussion

j_carl_39543's avatar
j_carl_39543
Icon for Nimbostratus rankNimbostratus
Nov 29, 2012

Creating iRule to mask/hide URL

Hi All,

 

 

I am new in using F5 Big-IP, I have a current task to either mask the website or totally hide the URL. If I decided to mask the URL, I need to create substitute link. Whenever the users click the URL link www.test.com, a different URL link will be displayed. Example www.test123.com but the original site www.test.com will be loaded. If I choose to hide the URL, the URL will be plain blank.

 

 

Please help which one is easier to implement and tips on how to implement it. Thanks in advance.

 

  • Hi Carl,

     

     

    The iRule was tailored very specifically for a customer's application. It was ~1200 lines of code. It's not feasible for you to adapt that iRule to a new application.

     

     

    Aaron
  • when HTTP_RESPONSE {

     

    set server_location [string tolower [HTTP::header Location]]

     

    if {$server_location starts_with "172.10.10.10:8050/cgi-bin/"} {

     

     

    HTTP::header replace Location [string map -nocase {172.10.10.10:8050/cgi-bin/lansweb 172.10.10.10:8050/} [HTTP::header value Location]]

     

    }

     

     

    }

     

     

    I have created an iRule to limit the uri displayed on the URL but it seems that it was not functioning as what it is created for. Can you guys help me if I missed something or need additional configurations.
  • The location header is mainly only used in redirections, it's not going to help you change the URL displayed in the browser when a normal 200 response is sent.