Forum Discussion
mikey_webb
Cirrus
Nov 25, 2014irules redirect help required
i have the below irule which will redirect to SSL, the question is how can i change so that http://www.mysite.co.uk/ does not get redirected but remains as http - thanks
when HTTP_REQUEST { ...
Hannes_Rapp
Nimbostratus
Nov 25, 2014Hi Mikey,
Try the solution as below:
when HTTP_REQUEST {
if { !([string tolower [HTTP::host]] starts_with "www.") } {
Probably a typo here? Your redirect destination is a non-standard HTTPS page
HTTP::redirect "[HTTP::host][HTTP::uri]"
} elseif { [HTTP::host] == "www.mysite.co.uk" } {
Step over. Omit any redirections
return
} else {
Default redirect
HTTP::redirect "https://[HTTP::host][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