redirect
65 TopicsURL redirect with path
I am trying to create a redirect irule but is not a standard redirect. It basically needs to take the URL + path and redirect it to another website + the path of the old URL. E.g. www.abc.com/path1/subpath2/ -> https://www.def.com/path1/subpath1/ www.abc.com/path4/subpath5/ -> https://www.def.com/path4/subpath5/ www.abc.com/ - > https://www.def.com/ The Url is not always the same therefore it needs to be flexible. Basically apply everything after the "/" to the new URL. In a situation where there is no path it just execute a normal redirect. below is my attempt which isn't working, not sure why. when HTTP_REQUEST { if { ([string tolower [HTTP::host]] equals "www.abc.com") and ([HTTP::uri] starts_with "/") } { HTTP::respond 301 Location "https://def.com[HTTP::uri]" }else { HTTP::respond 301 Location "https://def.com/" } }3.6KViews0likes5CommentsSimple Logout redirect irule
I have some sites that I need to redirect to an external URL. I have figured that out with an irule when HTTP_REQUEST { HTTP::redirect "https://OTHERSITE.com[HTTP::uri]" } On the external sites there is a "logout" button and that needs to hit a static web page that I have set up on the BIG-IP. So if a user goes to www.example.com they get redirected to www.othersite.com. While on www.othersite.com if they click logout it sends them back to www.example.com/Logout.html. I setup an irule and applied it to the same virtual server above the first redirect iRule. My thought is that the "www.example.com/Logout.html" is a specific URL so if the F5 sees that then to redirect it to the apology page, but if it sees anything else to just send it to the "OTHERSITE.COM" url. I'm sure I'm missing something but here's my other irule. when HTTP_REQUEST { if { ([HTTP::host] equals "http://example.com/Logout.html") } { "/generic_apology_pic.jpg" { HTTP::respond 200 content [ifile get "generic_apology_pic.jpg"] } default { HTTP::respond 200 content [ifile get "generic_apology.htm"] } } } } I probably wrote this as confusing as possible, but very simply I need to redirect all traffic to www.example.com to www.othersite.com, unless it's going to www.example.com/Logout.html, at which point I need to display a page that is hosted on the F5. Thanks in advance, David2.1KViews0likes2CommentsRedirect TCP connections from port 443 to 80
Hi All We have a port 80 and 443 VIP configured for 301 redirections to send sites to specific pages on a target branding site. We use 301 redirects and it works just fine via irule. However, for this to work for HTTPS requests, we need a cert and SSL profile to decrypt the request and then redirect it. The same irule is in use for both the 80 and 443 VIPs I'm wondering whether it's possible to do a basic 'when client_accept/connect' irule to force ALL connections to the VIP to go to the port 80 version so that we don't need to keep purchasing certs for 'old' websites. Perhaps another option would be to set a single client_ssl profile on the 443 VIP, use a 'when clientssl_handshake' iRule and try redirect to 80 that way, but I have my doubts. This is a bit beyond my current iRule skills.... Cheers1.9KViews0likes1CommentRedirect TLS 1.1/1.2 clients & Append the incoming URL to the redirect target
This is probably simpler than I'm trying to accomplish. I can't seem to get it working unfortunately. Any assistance would be appreciated. Summary Goal is to trigger a redirect for TLS 1.1/1.2 clients andAppend the incoming URL to the redirect (Testing out just the redirect first before I add more criteria) Example Inbound HTTPS Request https://abc.com/URIexample/abc/login?service=https%3A%2F%2website.domain.com Redirect to HTTP(S) External Internet Site https://xyz.com/random/random/warn.html?source=https://aaa.domainexample.com/blah/login?service=https%3A%2F Detail on redirect Redirect to ----> add "source=" AND append source URI addingSolved1.6KViews0likes4CommentsAPM Policy Error when logging in "Session cannot be established"
I am having an issue with APM I am hoping someone can help me with. I currently have a fairly basic policy setup using an external logon page. It then checks two domains to see if the user is part of either of those domains. I created a custom ending that redirects to the user back to the logon page if they are unable to be authenticated, and checked the box to close session data after redirect. The problem I am running into is it seems that if the user enters an incorrect password it brings them back to the logon page but no matter if they enter the correct password or an incorrect password they get the error: "Your session could not be established. BIG-IP can not find session information in the request. This can happen because your browser restarted after an add-on was installed. If this occurred, click the link below to continue. This can also happen because cookies are disabled in your browser. If so, enable cookies in your browser and start a new session." Anyone have any ideas on why the user cannot login the second time around?1.5KViews0likes4CommentsForm Based Authentication with Tomcat not working on F5
I have a virtual Server on the BigIP with a SSL client profile. The backend Tomcat server is accessible via http and offers the Tomcat form based authentication. I always get "Wrong Username or Password" It seems the Tomcat responds with status 302 and redirects to a http url, but even when enabling rewriting to https i can´t get it work. It seems the session information oder cookie gets lost but i am stuck in analysis. As the Tomcat form based authentication is a standard i wonder if someone is using this and got it working. Kind regards DanielSolved1.4KViews0likes2Commentsredirect to to 301 location
We are trying to come up with an irule that will: redirect based on id value X (eg. 144 string) to a new URL and append the same value in this new URL . So it must extract the id=X value and append it to the redirect URL Example: https://value-same.domain.com/external/services/datastorage/#/?id=144" Must be redirected (301 location) https://different-website.domain/external/services/datastorage/#/?id=144" the value 144 could be any value. I was thinking of this I have tried a range of irules usind data groups but it has to get the value from the request Does anybody have a suggestions? My irule below did not match anything but thats because of not hostname etc. when HTTP_REQUEST { if { [HTTP::uri] contains "/external/services/datastorage/#/?id=144"" }{ HTTP::respond 301 Location "https://different-website.domain/external/services/datastorage/#/?id=144"" } }Solved1.2KViews0likes6CommentsiRule Query String Match and Redirect
I seem to be having difficulty finding too much on this and maybe it is as simple as it is, I am looking to perform a URI match with a few particular query strings and redirect to another website if the request is found. I have found a few articles indicating using a datagroup but this seems a bit excessive for the task I am looking at. Example: https://www.thedomain.com/dir1/index.html?newpath=Name1 -> https://www.newdomain.com/dir1/index.html?newpath=Name1 Is this as simple as something like: when HTTP_REQUEST { if { ( [string tolower [HTTP::host]] equals "www.thedomain.com" ) and ( [string tolower [HTTP::uri]] ends_with "Name1" ) } { HTTP::redirect "http://www.newdomain.com[HTTP::uri]" } } Will the query string after the "?" be picked up and carried over with [HTTP::uri]?1.2KViews0likes3Comments