Forum Discussion
javier_diaz_379
May 04, 2011Nimbostratus
Rewrite URL
I want to accomplish the following:
Currently the web page we're serving both www. and non www.
I need a permanent redirect, so when a user requests the non www. version of the webpage it r...
You didn't specify the Protocol, so here is an example of an iRule that you could use on an HTTP Virtual Server to redirect to HTTPS and add a WWW if needed:
when HTTP_REQUEST {
if {[HTTP::host] starts_with "www."} {
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
} else {
HTTP::redirect "https://www.[HTTP::host][HTTP::uri]"
}
}
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