Forum Discussion

Jason_19901's avatar
Jason_19901
Icon for Nimbostratus rankNimbostratus
May 21, 2013

Remove the HEX from URL

when the user goes through the F5 the links look like https://1XX.XX.162.55/f5-w-687474703a2f2f6d7062684161$$/ is there anyway I can remove the hex and just make the uri look like https://1XX.XX.162.55 or whatever DNS name I choose?

 

3 Replies

  • you mean to remove /f5-w-687474703a2f2f6d7062684161$$/ part, don't you? is there anything static there (e.g. number of characters, terminate character, string format, etc)?
  • yes that is what I mean nitass I am not sure if its static. for the most part, it is the same number of characters.
  • there are a number of ways. anyway, this is just an example of regsub.

    [root@ve10:Active] config  b rule myrule list
    rule myrule {
       when HTTP_REQUEST {
      if { [HTTP::uri] contains "/f5-w-" } {
        HTTP::uri [regsub -nocase {/f5\-w\-[0-9a-f]+\$\$} [HTTP::uri] ""]
      }
    }
    }
    
    [root@ve10:Active] config  ssldump -Aed -nni 0.0 port 80
    New TCP connection 1: 172.28.20.11(57437) <-> 172.28.19.252(80)
    1369195360.4283 (0.0040)  C>S
    ---------------------------------------------------------------
    HEAD /f5-w-687474703a2f2f6d7062684161$$/something HTTP/1.1
    User-Agent: curl/7.19.7 (i686-redhat-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8y zlib/1.2.3 libidn/0.6.5
    Host: 172.28.19.252
    Accept: */*
    
    ---------------------------------------------------------------
    
    New TCP connection 2: 200.200.200.10(57437) <-> 200.200.200.101(80)
    1369195360.4301 (0.0016)  C>S
    ---------------------------------------------------------------
    HEAD /something HTTP/1.1
    User-Agent: curl/7.19.7 (i686-redhat-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8y zlib/1.2.3 libidn/0.6.5
    Host: 172.28.19.252
    Accept: */*
    
    ---------------------------------------------------------------