Forum Discussion
smund
Nimbostratus
Jun 17, 2008irule uri redirect headache
I have 2 seperate url's with uri's that I am trying to redirect a third url/uri.
I can do the one for one irule but I am stuck with doing a single irule for both.
this works:
when HTTP_REQUEST {
if {[HTTP::uri] equals {https://www.test.com:8143/iGetList.shtml}} {HTTP::uri {https://track.test.com/tally/iGetList.shtml}
}
}
this doesnt:
when HTTP_REQUEST {
if { [HTTP:8143:uri] starts_with "/iGetList.shtml" } {
HTTP::redirect "https://track.test.com/tally/iGetList.shtml"}
}
any ideas?
- The_Bhattman
Nimbostratus
The second one doesn't work cause the following is invalid "HTTP:8143:uri"when HTTP_REQUEST { set entirehost [HTTP::host][HTTP:uri] if { $entirehost eq "www.test.com:8143/igetList.shtml" } { HTTP::redirect "https://track.test.com/tally/iGetList.shtml" } }
when HTTP_REQUEST { if { HTTP::host] eq "www.test.com:8143" } { if { [HTTP::uri] starts_with "/iGetList.shtml" } { HTTP::redirect "https://track.test.com/tally/iGetList.shtml" } } }
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