Forum Discussion
Chris_Robert_10
Nimbostratus
Sep 15, 2006URL rewrite plus
I currently have this iRule running:
when HTTP_REQUEST {
if { [HTTP::uri] equals "/www.mysite.com/" } {
HTTP::uri "/www.mysite.com/index.htm/"
}
}
...
Eric_Grepps_264
Nimbostratus
Oct 02, 2006I got it to work using the following iRule:
when HTTP_REQUEST {
set sHost "[getfield [string tolower [HTTP::host]] "." 3]"
if { [HTTP::host] starts_with "www" }{
HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri]
} elseif {[string length $sHost] == 0 }{
HTTP::redirect https://www.[getfield [HTTP::host] ":" 1][HTTP::uri]
} else {
HTTP::redirect https://[getfield [HTTP::host] ":" 1][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
