Forum Discussion
DaleLeBlanc_140
Nimbostratus
Dec 26, 2013iRule to Redirect to certain directory
I need to create an iRule that will redirect users to a certain directory:
User enters: http://sitename
Redirect to: http://sitename/dev/central
I created this iRule:
when HTTP_REQUE...
Kevin_Stewart
Employee
Dec 26, 2013If I may add, unless you have multiple host names resolving to the same VIP, you could probably skip the host check and just evaluate an empty URI. Something like this:
when HTTP_REQUEST {
if { [HTTP::uri] equals "/" } {
HTTP::redirect "http://[HTTP::host]/dev/central"
}
}
In the absence of a URI in the browser request (ie. http://sitemame), there is still a URI value, albeit invisible, of "/".
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