Forum Discussion
need a irule for https url redirection.
Setup redirection to the default login page of this url. Whenever someone hits the below URL -
https://abc.com
needs to be redirected to
https://abc.com/NextGene/login.html
- Snl
Cirrostratus
try below
when HTTP_REQUEST { if { [HTTP::uri] equals "/"} { HTTP::redirect "https://[HTTP::host]/NextGene/login.html" } }
- chandu_naveen
Nimbostratus
Hi Snl,
Thanks for response. i hope the above rule is for http to https redirect right. but i need https to https/login page redirection.
Please look at my query once again.
- Snl
Cirrostratus
there is a built in default sys_https_redirect irule in F5 which you can apply to VS:80 and provided irule you can apply to VS:443 with http profile
when HTTP_REQUEST { if { [HTTP::host] contains “abc.com” } { HTTP::redirect https://abc.com/NextGene/login.html } } OR when HTTP_REQUEST { HTTP::redirect "https://abc.com/NextGene/login.html" }
- Sajid
Cirrostratus
try this
when HTTP_REQUEST {
if { ( [string tolower [HTTP::host]] equals "abc.com") } {
HTTP::redirect "https://abc.com/NextGene/login.html"
}
}
or
when HTTP_REQUEST {
switch -glob [HTTP::host] {
"abc.com" {
HTTP::redirect "https://abc.com/NextGene/login.html"
}
}
default { }
}
Mapped iRule on HTTPS VS
Recent Discussions
Related Content
* 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