Forum Discussion
Mathew_58740
Nimbostratus
Jul 18, 2012Redirection Of link
Hi
We have configured some sites in which there is a redirection i need to do,can anyone help on this
Requirement is as follows
https://www.example.com
when i...
nitass
Employee
Jul 19, 2012in case you would like to try irule.
e.g.
[root@ve10:Active] config b virtual bar list
virtual bar {
snat automap
pool foo
destination 172.28.19.79:443
ip protocol 6
profiles {
clientssl {
clientside
}
http {}
tcp {}
}
}
[root@ve10:Active] config b pool foo list
pool foo {
members 200.200.200.101:80 {}
}
before applying irule
[root@ve10:Active] config curl -Ik https://172.28.19.79/something
HTTP/1.1 302 Found
Date: Thu, 19 Jul 2012 08:05:23 GMT
Server: Apache/2.2.3 (CentOS)
Location: http://www.abc.com
Content-Type: text/html; charset=iso-8859-1
after applying irule
[root@ve10:Active] config b virtual bar rule myrule
[root@ve10:Active] config b rule myrule list
rule myrule {
when HTTP_RESPONSE {
if {[HTTP::is_redirect]} {
HTTP::header replace Location [string map {http:// https://} [HTTP::header Location]]
}
}
}
[root@ve10:Active] config curl -Ik https://172.28.19.79/something
HTTP/1.1 302 Found
Date: Thu, 19 Jul 2012 08:06:07 GMT
Server: Apache/2.2.3 (CentOS)
Location: https://www.abc.com
Content-Type: text/html; charset=iso-8859-1
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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