Forum Discussion
cxcal_18687
Jan 26, 2011Nimbostratus
HTTP and URI Redirect
Can someone assist with a iRules with the following requirements:
1) When a client hits "" they should be redirected to "https:///Proxy"
2) If clients hits they should be redirected to https:///Proxy"
Any help would be greatly appreciated!
- cxcal_18687NimbostratusCORRECTION...
- Colin_Walker_12Historic F5 AccountI'm a bit confused. http:/// won't get anyone to your server, let alone to the appropriate VIP. What hostname did you want to search for?
- cxcal_18687NimbostratusRight now I have not been provided a hostname. Only the IP. But they will use something like "medstest.com".
- Colin_Walker_12Historic F5 AccountOkay, so you just want a redirect that works for either HTTP or HTTPS?
when HTTP_REQUEST { if {([HTTP::host] eq "medtest.com") and ([HTTP::uri] eq "/")} { HTTP::redirect "https://10.10.10.1/Proxy" } }
- cxcal_18687NimbostratusThanks.. I will test this out.
- Colin_Walker_12Historic F5 AccountSure thing, let me know how it goes.
- cxcal_18687NimbostratusScript would not take on the load balancer..
- cxcal_18687NimbostratusThe iRule below hangs when executed http://hostname.com and then times out.
- cxcal_18687NimbostratusOK...a reboot fixed the fact that I could not see any VIP traffic at all.. go figure...
- Colin_Walker_12Historic F5 AccountOkay, so if you want to use the HTTP::redirect command, you need an HTTP profile assigned to the VIP. Try using the base HTTP profile and see how that treats you.
when HTTP_REQUEST { if { [HTTP::host] equals "uat.ac.com" and [HTTP::uri] equals "/"} { HTTP::redirect "https://uat.ac.com/Portal" } }
Recent Discussions
Related Content
Â
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects