Forum Discussion
jake_macabuag_4
Nimbostratus
Nov 07, 2012URL rewrite
Hello everyone
I'm a newbie when it comes to irules and i am trying to create URL rewrite rule for web server load balancing. Basically, the local web server can be accessed via http://HOST/tren...
Nov 07, 2012
As "What Lied Beneath" said, Rule 2 looks better.
If using switch, try to avoid the -glob switch unless using wildcards to match the outcome.
Regarding rule 2 you could always try some good old fashioned debugging.
Try the rule below and check the ltm log (/var/log/ltm) for the outcome.
when HTTP_REQUEST {
set uri [string tolower [HTTP::uri]]
log local0. "Uri: $uri"
if { $uri equals "/" } {
log local0. "Replacing uri with /trendsnet_com_ph"
HTTP::uri "/trendsnet_com_ph"
}
}
Also, check the logs of the web server to verify that the incoming requests has the correct uri.
The virtual server should have a default pool if one is not chosen via iRules but I reckon you've already thought about that.
Kind regards,
Patrik
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
