Forum Discussion
murali_125469
Nimbostratus
Oct 17, 2013URL Redirection with in another complex https to http redirection rule ? please guide me
Hello everyone ,
Iam new to this irules but some how figured out to write one obviously it's not working...
Requirement :
1.Need to redirect multiple urls say "*.something.com" to fixe...
Kevin_Stewart
Employee
Oct 17, 2013You were pretty close. You don't need the pool command because you're not proxying the traffic. Here's what it might look like:
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] contains "something.com" } {
HTTP::redirect "http://aredirect.something.com/Home.html?u=[HTTP::host][HTTP::uri]"
}
}
A request for "http://app.something.com/foo" should generate a redirect to "http://aredirect.something.com/Home.html?u=app.something.com/foo"
There is one thing though that may cause a problem. If the URL you're redirecting to is this same VIP, then you'll find yourself in an endless loop, as all URLs will contain "something.com".
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