Forum Discussion
dsirrine_24840
Altostratus
Feb 17, 2009rewrite rule looping
I've got what would seem to be a simple redirect:
I'm trying to take any requests bound for:
http://ads.xyz.com/
and redirect them to:
https://ads.xyz.com/some/stuff.do
The rule I put up was this:
if { [HTTP::host] equals "ads.xzy.com"} {
HTTP::redirect "https://[HTTP::host]/some/stuff.do:443"
}
but when I watch it through wireshark it just loops endlessly (because the redirect matches the rule itself?)
Can someone help out an F5 newb?
Thanks.
- The_Bhattman
Nimbostratus
How about thisif { ([HTTP::host] equals "ads.xyz.com") and ([HTTP::uri] ends_with"/") } { HTTP::redirect "https://[HTTP::host]/some/stuff.do" }
- AndrewO_4840
Nimbostratus
Assuming your rule is applied to the port 80 VIP this shouldn't be an issue - just make sure you don't apply the rule to your port 443 VIP. - Alok_3817
Nimbostratus
Posted By dsirrine@gmail.com on 02/17/2009 1:45 PM
if { [HTTP::host] equals "ads.xzy.com"} { HTTP::redirect "https://[HTTP::host]/some/stuff.do:443" }
if { ([HTTP::host] equals "ads.xyz.com") and ([HTTP::uri] equals "/") } { HTTP::redirect "https://[HTTP::host]/some/stuff.do" }
if { ([HTTP::host] equals "ads.xyz.com") { if {[HTTP::uri] equals "/"} { HTTP::redirect "https://[HTTP::host]/some/stuff.do" } }
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