Forum Discussion
Rene_C__129338
Feb 25, 2014Nimbostratus
Well,
the short answer: yes, the F5 can handle it.
the longer answer: Do you want to just redirect any requests from http[s]://example.com/ to https://example.com/example1/example.htm? Or just specific ones?
If you want all requests redirected: Usually you have a virtual-server for http and another one for https.
For the virtual-server for http you could add a new irule containing:
when HTTP_REQUEST {
HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri]
}
for the virtual-server for https, you could add something like that:
when HTTP_REQUEST {
if { [HTTP::uri] eq "/" } {
HTTP::redirect "/example1/example.htm"
}
}
(Untested, but i guess you get the point)
- Sami_Sheikh_140Feb 26, 2014NimbostratusSo I am unsure of what you mean by all requests or specific ones. If I understand what you are trying to say then I would say all requests, basically I could put the forward rule in IIS as well but I don't want to touch the server at all since it is an app server and is very delicate. So basically I have about 6 Virtual servers(3 for HTTP and 3 for HTTPS) for 3 different domains but pointing to the same servers and I would like for instance anybody from outside going to http(s)://example1.com to https://example.com/welcome/welcome.htm and http(s)://example2.com to https://example2.com/welcome/welcome.htm so and so forth. Will those Irule you posted above, can I achieve what I am trying to achieve here? Thanks again Rene
- Rene_C__129338Feb 26, 2014NimbostratusIf you assign the first rule to the http - virtuals and the second one to the https-virtuals, this should do what you want.