Forum Discussion
HTTP to HTTPS redirect and Append to URL
I have this VIP and I want to add an irule that will take a URL like http://iamqa.something.com and change it to HTTPS and append the following https://iamqa.something.com:8443/aveksa/admin. Basically, I just want the user to type iamqa.something.com in their browser and get redirected to https://iamqa.something.com:8443/aveksa/admin
Any help would be great. Everything I try it fails.
1 Reply
Hi Rob,
if the HTTP virtual server is exclusively used for the redirect, then use this iRule...
when HTTP_REQUEST { HTTP::redirect "https://iamqa.something.com:8443/aveksa/admin" }if the HOST-name
is exclusively used for the redirect, then use this iRule...iamqa.something.comwhen HTTP_REQUEST { if { [string tolower [HTTP::host]] eq "iamqa.something.com" } then { HTTP::redirect "https://iamqa.something.com:8443/aveksa/admin" } }if just the
(website root) of the HOST-name/
should be redirected, then use this iRule...iamqa.something.comwhen HTTP_REQUEST { if { [string tolower [HTTP::host]] eq "iamqa.something.com" } then { if { [HTTP::uri] eq "/" } then { HTTP::redirect "https://iamqa.something.com:8443/aveksa/admin" } } }Cheers, Kai
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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