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
when i browse the above link its working fine,If i open a particular page in it redirects to another link with the below link
i want to change this http://www.abc.com to https://www.abc.com so that it will hit the VS i configured for www.abc.com on https
Can some one help to achieve this
Thanks
Mathew
nathe
2
Mathew,
I think in this case a Stream Profile might be simpler than an iRule. Apply it to the VS.
See how you get on with this.
N
nitass
3
in 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