Forum Discussion

Anzine321's avatar
Anzine321
Icon for Altostratus rankAltostratus
Apr 05, 2024

Rewrite uri translation not working

hi

I have a case f5 not translate uri forward to server

Client uri /graph and server uri without /graph

Dump on f5 u found uri from f5 to server not replace stil used path /graph and f5 did not change uri to client

I am not sure this rewrite uri translation work as expected 

 

Thanks

 

 

7 Replies

  • Ensure that the rewrite rules are correctly configured in your server or proxy settings. Double-check the syntax and the rules themselves to make sure they are properly written and applied.

  • Can you provide your current configuration for this rule please?

    • Anzine321's avatar
      Anzine321
      Icon for Altostratus rankAltostratus

      tm profile rewrite ztest_rewrite_custom {
          app-service none
          bypass-list none
          client-caching-type cache-css-js
          defaults-from rewrite-uri-translation
          request {
              insert-xforwarded-for enabled
              rewrite-headers enabled
          }
          response {
              rewrite-content enabled
              rewrite-headers enabled
          }
          rewrite-list none
          rewrite-mode uri-translation
          uri-rules {
              uri_12361712510071115123268111763 {
                  client {
                      host 10.244.10.10
                      path /graph/login/
                      scheme http
                  }
                  server {
                      host 10.245.2.3
                      path /login/
                      port 3000
                      scheme http
                  }
                  type response
              }
              uri_95164680339253899974116613 {
                  client {
                      host 10.244.10.10
                      path /graph/
                      scheme http
                  }
                  server {
                      host 10.245.2.3
                      path /
                      port 3000
                      scheme http
                  }
                  type request
              }
          }
      }

       

       

      i just review dump and flow like this

      from client to F5

       GET /graph/ HTTP/1.1 

       

      from f5 to server 

      GET / HTTP/1.1 

       

      Response from  server to f5

      HTTP/1.1 302 Found  (text/html)

       

      Response from  f5 to client 

       HTTP/1.1 302 Found  (text/html)

       

      on my lab with different server work properly and request from client add /graph/login uri

       

       

      • Paulius's avatar
        Paulius
        Icon for MVP rankMVP

        I do apologize, but from your update it seems like things are working the way you explained. If you could explain this in a different way I should be able to assist you. If you can provide what the client sends and what you want the server to receive that would be helpful. An example as follows.

        client -> f5 - /hello

        f5 -> server - /hello/world

        server -> f5 - /hello/world

        f5 -> client - /hello