Forum Discussion
Bertolazzi_7869
Apr 18, 2012Nimbostratus
HTTP Redirect: Hint or an example?
Hi everyone
!
Sorry for
my bad
English.
See if you
can help me, I'm a newbie in F5 and iRules and I search the following:
Redirect
requests ...
nitass
Apr 18, 2012Employee
do you want redirection or rewriting?
Redirect vs. Rewrite
http://cheeso.members.winisp.net/iirf20Help/html/2e820208-c2eb-4d6d-a134-c63f7d41244f.htm
this is an example of redirection.
[root@ve1023:Active] config b virtual bar list
virtual bar {
snat automap
pool server
destination 172.28.19.79:8080
ip protocol 6
rules myrule
profiles {
http {}
tcp {}
}
}
[root@ve1023:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
if { [HTTP::uri] equals "/ABC" } {
HTTP::redirect "http://[HTTP::host]/DEF"
}
}
}
[root@ve1023:Active] config curl -I http://www.mydomain.com:8080/ABC
HTTP/1.0 302 Found
Location: http://www.mydomain.com:8080/DEF
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
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