Forum Discussion
Jovanny_Basilio
Nimbostratus
Mar 15, 2010Simple URL redirect
I have a need for a simple iRule that will redirect based on url...to put it simple I am trying to redirect
domain.com ---> to www.domain.com
domain.com/abc ---> www.domain.com/...
JRahm
Admin
Mar 16, 2010You'd want to check to make sure that the www. wasn't submitted:
when HTTP_REQUEST {
if { [HTTP::host] eq [domain [HTTP::host] 2] } {
HTTP::redirect "http://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
