Forum Discussion
johndegern_4568
Nimbostratus
Apr 30, 2010Forcing lowercase only works the first time
So I am trying to force ALL HTTP requests to lowercase and i'm using this rule:
when HTTP_REQUEST {
HTTP::path [string tolower [HTTP::path]]
}
It works on the host and it wo...
Michael_Yates
Nimbostratus
May 03, 2010I think that the iRule is probably working, as this iRule is set to process everything. If you are using IIS, then it really doesn't matter because it really doesn't care, but you can still use the iRule to correct the case as it is presented to the server.
As Hoolio pointed out, it would be a resource intensive process to rewrite everything within the website, as well as the contents of the [HTTP::header "Location"] where any website Hyperlinks or Redirects would be put to transport back to the requestor.
Your best bet is going to be that the iRule is working on all incoming traffic, and then advise the developers to start using lower case for everything.
How to Verify:
when HTTP_REQUEST {
HTTP::path [string tolower [HTTP::path]]
log local0. "String to Lower iRule: [HTTP::path]"
}
The "log local0. "String to Lower iRule: [HTTP::path]"" will log the [HTTP::path] to the LTM Log.
Apply the iRule to a Virtual Server that you want to test.
SSH into the F5 and locate the LTM Log:
cd /var/log
Set continuous read from the LTM Log:
tail -f ltm
Do your testing and every time the iRule fires you should see the entry in the log and it should show the URL you access after it has be processed by the iRule (everything should be lower case).
NOTE: This iRule will not change the URL displayed in the Browser. It will only change what is being sent to the server.
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
