Forum Discussion
laurent_marion_
Nimbostratus
Jan 27, 2006https, http redirect tips & tricks
Hi,
i worked with irule and i have a small problem:
i have an internet website in https and http
my browser go to http://www.mywebip.com/
i want to follow this ...
F5_LB_Eng
Cirrostratus
Jul 28, 2009Hi All,
I want to redirect http to https and https to https.
for exam http://prasanna.f5.com to https://prasanna.dev.f5.com , https://prasanna.f5.com to https://prasanna.dev.f5.com
i write the irule like below.
when HTTP_REQUEST {
if { ([HTTP::host] equals "prasanna.f5.com") } {
HTTP::respond 301 Location "https://prasanna.dev.f5.com[HTTP::uri]"
}
else {
HTTP::respond 301 Location https://[getfield [HTTP::host] ":" 1][HTTP::uri]
}
}
but the customer want now
http://*/* -> https://prasanna.dev.f5.com/*
https://*/* -> https://prasanna.dev.f5.com/*
can you please help me on this irule.
Regards
Prasanna AR
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects