Forum Discussion
Sonny_J_Bonds_1
Nimbostratus
Jun 09, 2015http to https redirect working but want to add www.
Hi,
This iRule is working to redirect http to https and leaving the hostname intact. Exactly what I want.
when HTTP_REQUEST {
HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::u...
Sonny_J_Bonds_1
Nimbostratus
Jun 22, 2015Anto, thanks for your help to get things started for me. That partially worked but it didn't redirect http://www.abc.com to only http://abc.com redirected to https://www.abc.com. Needed both incoming request as http (www. and no www) to be redirected to https://www.abc.com.
For my situation, I got it to work with this:
when HTTP_REQUEST {
if { [HTTP::host] contains "abc"} {
HTTP::redirect https://www.abc.com[HTTP::uri]
}
}
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