Forum Discussion
Ravi_110217
Nimbostratus
Mar 11, 2008HTTP page redirection request
Hello Guys,
I wonder if someone could help me with following web page redirection rule. I am not much more familiar with F5 product, please help me out with my following request.
I want...
Mar 11, 2008
The problem with your iRule is that it will lead to an infinite loop. The redirect will go back into the iRule and, since the host is the same, it will issue the redirect again. You'll want to add a check to see if the URI is blank before issuing the redirect. I'm also not sure what's up with the close curly brace after your HTTP redirect statement. That should go too...
This should do the trick for you:
when HTTP_REQUEST {
if { ([HTTP::host] eq "www.abc.com.au") && ([HTTP::uri] eq "/") } {
HTTP::redirect "http://www.abc.com.au/abconline/HomePage.aspx"
}
}Now, if your virtual is only hosting the www.abc.com.au domain and no others, then you can remove the first comparison and just have the URI check. But, if it's hosting multiple domains and you only want the redirect for when the host AND uri match this condition, leave it as is.
-Joe
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
