Forum Discussion
Sorin_Rusnac_86
Nimbostratus
Mar 27, 2008http redirect ?
Hi -
I am trying to do a redirect as such:
when HTTP_REQUEST {
HTTP::redirect "http://[HTTP::host]/mysite/test1"
}
I dont get any errors but when I...
Nicolas_Menant
Employee
Mar 27, 2008Hi,
when HTTP_REQUEST {
HTTP::redirect "http://[HTTP::host]/mysite/test1"
}
Here you create an infinite loop since it will be triggered on every HTTP request.
you should try something like this:
when HTTP_REQUEST {
if { not ([HTTP::uri] contains "mysite") } {
HTTP::redirect "http://[HTTP::host]/mysite/test1"
}
}This way if the uri contains mysite, it means the client has already been redirected and shouldn't be redirected anymore
HTH
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