Forum Discussion
Greg_Haywood_10
Nimbostratus
Oct 12, 2005newbie case sensitive question
I am attempting to create rules for a site that has loads of .asp scroipts in the root directory (I know, not created by me) These scripts have mixed case ind is basicly a nightmare.
I have no experience with irules, but do understand perl syntax.
I want to have a rule that allows an asp script as long as its all aphanumeric characters and not longer than 30 characters long.
Here is my attempt:
if(
http_uri matches_regex "([a-zA-Z0-9\.])" and
http_uri ends_with "\.asp$"
} {
lets go...
}
else
{
bye bye
}
Sorry to sound so newbie but I have been dropped in the deep end with this.
Regards,
Greg
- Martin_MachacekHistoric F5 AccountGreg,
rule name_check { if(substr(http_uri, 30) == "" and http_uri ends_with ".asp" and substr(http_uri, 1, '.') matches_regex "^[a-zA-Z0-9]+$") { use pool some_pool } else { redirect to "http://betterlucknexttime.com" } }
- Greg_Haywood_10
Nimbostratus
Thanks for the reply, - Martin_MachacekHistoric F5 AccountGreg,
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