Forum Discussion
nlong_67651
Nimbostratus
Sep 15, 2010https and www redirect
I am trying to figure out how to redirect the initial requests for http://sitename.com/* and https://sitename.com/* to https://www.sitename.com/* Is this easily accomplished using one irule? All SSL...
The_Bhattman
Nimbostratus
Sep 15, 2010Hi nlong,
I suppose if you have 2 virtuals you can run this irule
when HTTP_REQUEST {
if {[HTTP::host] eq "sitename.com" } {
HTTP::redirect "https://www.[HTTP::host]/[HTTP::uri]"
}
}
or
when HTTP_REQUEST {
switch -glob [HTTP::host] {
"sitename.com" { HTTP::redirect "https://www.[HTTP::host]/[HTTP::uri]" }
}
}
I hope this helps
Bhattman
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