How to rewrite a path to a backend service dropping the prefix and passing the remaining path?
Hello, I am not sure whether my posting is appropriate in this area, so please delete it if there is a violation of posting rules... This must be a common task, but I cannot figure out how to do the following fanout rewrite in our nginx ingress: http://abcccc.com/httpbin/anything-> /anything (the httpbin backend service) When I create the following ingress with a path of '/' and send the query, I receive a proper response. curl -I -k http://abczzz.com/anything apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: mikie-ingress namespace: mikie spec: ingressClassName: nginx rules: - host: abczzz.com http: paths: - path: / pathType: Prefix backend: service: name: httpbin-service port: number: 8999 What I really need is to be able to redirect to different services off of this single host, so I changed the ingress to the following, but the query always fails with a 404. Basically, I want the /httpbin to disappear and pass the path onto the backend service, httpbin. curl -I -k http://abczzz.com/httpbin/anything apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: mikie-ingress namespace: mikie annotations: nginx.ingress.kubernetes.io/rewrite-target: /$2 spec: ingressClassName: nginx rules: - host: abczzz.com http: paths: - path: /httpbin(/|$)(.*) pathType: Prefix backend: service: name: httpbin-service port: number: 8999 Thank you for your time and interest, Mike19KViews0likes15CommentsF5 LTM - iRule that will replace the host, remove the path and send traffic to the specific pool
Hi, I have a standard VIP on port 443 with SSL client and servers side profile and some pool on port 443 as well. What I need to implement on that VIP is: when the path begins with /VPC ( for example https://example.com/VPC) the host name (example.com) needs to be replaced by (example2.net) and path /VPC needs to be removed. After that this traffic (https://example2.net/) needs to be send to the specific pool (different than default but also on port 443). I suppose the iRule is the best option here. Unfortunately I cannot make simple 302 redirect... Of course if the URI does not begin with /VPC the traffic needs to go to the default pool. I found some similar cases on devcentral however neither of them match all the requirements.663Views0likes4CommentsiRule for load balancing to different virtual server depending on the URI path
Hi Guys, I have three Virtual Server to be configured on our LTM's which are running on the version 15.1.7. One virtual server is facing to client (let say VS-A) and contains two virtual server (let say VS-B and VS-C) that should be load balance. VS-B and VS-C need to load balance on the VS-A but the incoming traffic should be clasify use the uri /path. The conditions like this: if the uri contains /aa, /bb, /cc will be forward and load balance to VS-B and VS-VS-C. I tried to make irules like this: when HTTP_REQUEST { if { [HTTP::uri] contains "/aa,/bb,/cc" } { virtual VS_B } else { virtual VS_C } } But the results is traffic from the client always going to the VS-B, so the load balancing doesn't have running. I don't know it can be configured with the iRules or not, since I am not an expert in writing the iRules can anyone suggest me with the iRules that helps working the VIP as mentioned above. Appreciate any kind your insight. Thanks606Views0likes7CommentsRedirection iRule Request for subsites
Hello I am pretty new to F5 and would like to see if someone can help me with a redirection iRule. The redirection should retain path after the second location or the subsites. So I am looking for something like: 1. when going to http://abcsp/sites/apps should be redirected to https://apps.abcsharepoint.example.com/ 2. when going to http://abcsp/sites/apps/SomethingSomething should be redirected to https://apps.abcsharepoint.example.com/SomethingSomething 3. when going to http://abcsp/Anythingotherthansites should be redirected to https://abcsharepoint.example.com/ What I have in place right looks something like this: when HTTP_REQUEST { switch -glob [string tolower [HTTP::host]] { "abcsp" { if { [HTTP::uri] starts_with "/sites/apps/" } { HTTP::redirect "https://apps.abcsharepoint.example.com/" } elseif { [HTTP::uri] starts_with "/" } { HTTP::redirect "https://abcsharepoint.example.com/" } } } } This is doing only 1 and 3. 2 is missing... Thanks in advance!359Views0likes2CommentsIncorrect APM path in visual policy editor
Hi, I'm having some troubles in visual policy editor ... I've copied the access policy, and I named it Abc_AccessTestniProfil. But when I open Visual Policy Editor, path to the Access Policy is completely different (pictures bellow). Has anyone already had a problem with this? Is there any chance to change the path in visual policy editor? SW version: 12.1.2 HF2. Regards, Spela208Views0likes1Comment