Forum Discussion
cjones_01_13155
Nimbostratus
Jun 12, 2014Lowercase URI
Below I have the current rule setup:
when HTTP_REQUEST {
Check for capital letters in string
if {[string match {[A-Z]} [HTTP::path]]}{
HTTP::redirect "http://[HTTP::host][string tolower [H...
Cory_50405
Noctilucent
Jun 25, 2014Let's try nested if statements, with logging. This preserves your original check which you say was working:
when HTTP_REQUEST {
if { [string match {[A-Z]} [HTTP::uri]] } {
log local0. "Capital letter found in URI"
if { [HTTP::path] ends_with ".aspx" } {
set hostname [string tolower [HTTP::host]]
set uriname [string tolower [HTTP::uri]]
log local0. "Request is $hostname$uriname"
HTTP::redirect "http://$hostname$uriname"
}
}
}
What gets logged to /var/log/ltm when you attempt a connection using this iRule and an FQDN of http://stg.sp10.shrm.org/LegalIssues/EmploymentLawAreas/Pages/default.aspx?
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