Hi,
I have URL as , when typing at the browser, it will auto redirect to folder and the URL at the browser will show https://www.abc.com/xyz/Login.aspx?ReturnUrl=%2Fxyz
Question: How do I write iRule, whenever user type (in either one of these conditions):
- http://www.abc.com
- http://www.abc.com/xyz
- https://www.abc.com
- https://www.abc.com/xyz
it will go able to reach and it automatically resolve https://www.abc.com/xyz/Login.aspx?ReturnUrl=%2Fxyz
Apparently, I have 2 VIPs(http and https), how should I write the iRule for both?
Thanks
Question: How do I write iRule, whenever user type (in either one of these conditions): http://www.abc.com http://www.abc.com/xyz https://www.abc.com https://www.abc.com/xyz
So thats 3 http URL and 2 https urls, but all these 5 URL’s still resolve to same VIP. If the traffic comes on http - it would goto 1.1.1.1:80 VIP, if the traffic comes to https - it would goto 1.1.1.1:443 VIP.
So you require all 3 URL’s to goto https, a simple http2https Irule on the 1.1.1.1:80 VIP should do the work.
- When traffic comes, it would goto https://www.abc.com
- When traffic comes, it would goto https://www.abc.com/xyz
- When http://www.abc.com traffic comes, it would goto https://www.abc.com
- When http://www.abc.com/xyz traffic comes, it would goto https://www.abc.com/xyz
Hi,
you can try this irule
when HTTP_REQUEST {
if {[HTTP::host] equals "www.abc.com"} {
switch [HTTP::path] {
"/" - "/xyz" {HTTP::respond 301 Location "https://www.abc.com/xyz/Login.aspx?ReturnUrl=%2fxyz"}
}
}
}
For you information, even if user enter in browser bar ";, ";, ";, ";, "; or ";, the HTTP request is the same:
GET / HTTP/1.1
Host: www.abc.com
User-Agent: blablabla
Other headers: blablabla