Forum Discussion
Sorin_Rusnac_86
Nimbostratus
Mar 12, 2008iRule to overwrite Page Extension help!
Hi -
Hoping somebody can help me is there a sample or code i can use to overwrite file extenstions on pages is this possible?
For example what I want the iRULE to do is as follows:...
Nicolas_Menant
Employee
Mar 12, 2008hi,
you should be able to do something like this:
when HTTP_REQUEST {
set path_without_extension [getfield [HTTP::path] "." 1]
set extension [string tolower [getfield [HTTP::path] "." 2]]
log local0. "path_without extension is $path_without_extension"
log local0. "extension now is $extension"
set new_path "$path_without_extension.$extension"
log local0. "new path is: $new_path"
HTTP::path $new_path
}
i added debugging data in case i missed something. Debugging info should be avaiable in /var/log/ltm through the CLI or in system>log>local traffic through the GUI
i may have done an error ^^
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