iRule to Redirect to Another VS on the same LTM
Hi guys - I'm trying to get the following scenario working: My domain "; maps to a public IP "1.1.1.1" and I have a virtual server configured on my F5 with "1.1.1.1:443" I have two unrelated applications with competing requirements running on different URIs on the same domain , one is a HR application (/abc) and the other is a inventory application (/def) I need to create a design which accomodates both applications with a single domain name, and find a way to accomodate both their conflicting requirements under the same domain name To solve this problem, I thought that I should do something like this, on the main virtual server 1.1.1.1:443, I put in an iRule with the following code: when HTTP_REQUEST { if { [string tolower [HTTP::uri]] starts_with "/abc" } { virtual VS2 } else if { [string tolower [HTTP::uri]] starts_with "/def" } { virtual VS3 } else { HTTP::respond 200 content "Unrecognised URI, please recheck your address" } } This would redirect incoming requests with "/abc" in the URI string to VS2 and incoming requests with "/def" in the URI string to VS3. Then I could create customised solutions for both applications in their respective virtual servers. So drawing this flow out, I think this is how it would look: But what I don't understand is how the Return Traffic and the Persistence Profiles work in this scenario. How do I make sure that the traffic flows this way: User to Server: User > VS1 > VS2 > Pool 2 (Server) Server to User: Pool 2 (Server) > VS2 > VS1 > User Do I do SNAT Auto Map on both VS1 and VS2 or do I just do SNAT Auto Map on VS2 with Auto Last Hop enabled? And on the question of persistence, if I intend to use source_addr persistence - I would definitely not be able to do a SNAT Auto Map on VS1, how do I then ensure that when the server responds, VS2 sends the traffic back to the user via VS1?3KViews0likes3CommentsExchange 2007 redirection issue
Hi, I deployed iApp template for Exchange 2013 and it works fine. But in this environment there are legacy Exchange server (2007) and Exchange 2013 server. I modified Access policy by following instructions from this video https://www.youtube.com/watch?v=xRsUqWp1Ngs. My final result is: For Exchange 2013 everything works fine. For Exchange 2007: user tries to authenticate and enters his credential, system redirect him to legacy server and logon screen shows up again. After second authentication browser tries to enter to Exchange 2007 mailbox but it get stuck there. APM logs show that the issue occures when expression user.session.exchange comes to evaluation e.g. it says: fail to authenticate. Does anyone has any advice regarding this issue? Thanks in advance.972Views0likes1CommentLoadbalance a URL to 3 URLs
Hi Guys, I have a requirement like when HTTP_REQUEST { if { [HTTP::path] equals "/exampletext" it should loadbalance/roundrobin the redirection to 3 URLs shown below "https://abc1ee.xyz.com/exampletext_1" "https://abc2ee.xyz.com/exampletext_2" "https://abc3ee.xyz.com/exampletext_3" Kindly, help ! TIA691Views0likes6CommentsNeed help to understand re-direct irule
Hi Experts !, Need your help to understand the below irule , This irule is applied to 443 VIP .Please help me to understand the impact of the below irule , when HTTP_REQUEST { if { [HTTP::uri] contains "redirect_uri=https://test-ck2-ind.example.com" } { HTTP::uri [string map {"redirect_uri=https://test-ck2-ind.example.com/" "redirect_uri=http://test-ck2-ind.example.com/"} [HTTP::uri]] } }674Views0likes4CommentsRedirect requests of all URLs except few URLs
Dear Beloved Community, I have a requirement to fulfill in LTM as below for which I need your support to provide me an iRule. Client requests containing any URIs should be redirected as below https://abc.com redirect to https://xyz.com But If client requests contains any of following URIs then do not perform redirection to https://xyz.com https://abc.com/morning OR https://abc.com/afternoon OR https://abc.com/night OR https://abc.com/school OR https://abc.com/leadership Your Sincerely595Views0likes6CommentsUrl redirect to a subdomain from sepcific URi to subdomain with the same URi
Hello, We need to achieve this : (or whatever url after the “mobile”) redirect/rewrite it to : mobile.newdomain.com/news.asp (or whatever url that was entered after the “mobile” in the first place). Our irule looks like this currently: when HTTP_REQUEST { if {([string tolower [HTTP::host]] eq "mobile.domain.com")} { HTTP::respond 301 Location "https://mobile.newdomain.com[HTTP::uri]" } if {([string tolower [HTTP::uri]] contains "/mobile")} {HTTP::respond 301 Location ";} } What happens it when going to : “” it redirects to “mobile.newdomain.com” as it should. But when entering “” it redirects to “mobile.newdomain.com/mobile/news.asp” Any help would be much appreciated! thank you!587Views0likes2CommentsPool Selection Based on URI and URL Modification
I'm trying to write an iRule that will redirect traffic to different pools based on URI, as well as altering the URL to remove the URI after the traffic is redirected to the correct pool. I think I have the initial pool redirect figured out, but I can't figure out how to do that AND THEN shorten the URL. Here are my examples: https://test.test.com/url1 to pool1 then remove /url1 https://test.test.com/url2 to pool2 then remove /url2 https://test.test.com/url3 to pool3 then remove /url3 https://test.test.com/url4 to pool4 then remove /url4 https://test.test.com/ to pool5 This is what I ahve for the pool selection/redirection: when HTTP_REQUEST { switch -glob -- [string tolower [HTTP::path]] { "/url1*" { pool /Common/Pool1 return } "/url2*" { pool /Common/Pool2 return } "/url3*" { pool /Common/Pool3 return } "/url4*" { pool /Common/Pool4 return } "/*" { pool /Common/Pool5 return } } Thanks all!!566Views0likes4Commentsredirect root URL to another URL
I have a public facing url cdn.mydomain.com that I need to redirect to mydomain.com if anyone goes to that site. There is nothing on the cdn website, it simply exist to feed other sites withing our environment, but has to maintain a public facing presence. The issue I have is cdn.mydomain.com is being used in several other websites for varies purposes but when I setup the redirect it break all the other sites. Below is the irule I've tried to get working. I've attempted it with just the equals "/" option but didn't change anything, other sites that call the cdn would get redirected as well. Am I missing something? when HTTP_REQUEST { if { ([string tolower [HTTP::host]] equals "cdn.mydomain.com") || ([string tolower [HTTP::host]] equals ";)} { HTTP::respond 301 Location https://mydomain.com/ } }474Views0likes0CommentsRedirect URL with dynamic URI
Hello all, i need some support by a redirect. The problem is the following: I want to redirect the URL with URI Path https://www.myurl.com/mypath to https://www.anotherurl.com/mypath. I Only want to change the URL and the URI should be the same after the redirect. Is it possible to do this by policies or do i need an iRule? Thanks for your help!465Views0likes1CommentMultiple port redirection with an iRule
I have 2 servers I need to be able to reddirect 1 virtual server to and am having trouble with the iRule. Here is my iRule when HTTP_REQUEST { if { [HTTP::uri] equals "/" } { HTTP::redirect "http://[HTTP::host]/subfolder/Default.html" } } My 2 nodes are on different ports on each server. The irule redirects like this. http://server.net/subfolder/Default.html:30005 I need it to send it to this. http://server.net:30005/subfolder/Default.html Thanks for any assistance in advance.461Views0likes4Comments