07-Oct-2022 03:37
Dears,
I have a requirement to create irule below requirement If URL is referring to a page that does not end with a "/" or a file ending ".xxx" then redirect to the same URL ending with a "/"
when HTTP_REQUEST {
set req [string tolower [HTTP::path]]
if { !([class match $req ends_with extensions])
or !($req ends_with "/") }
{ HTTP::path "[HTTP::path]/" }
}
Above irule will meet my requirements? addtionaly where I can define the extensions under data group records as below?
ltm data-group internal /Common/extensions {
records {
07-Oct-2022 05:31
Hi Ramv,
when HTTP_REQUEST {
if { !([class match [string tolower [HTTP::path]] ends_with /Common/extensions]) and !([string tolower [HTTP::path]] ends_with "/") } {
HTTP::path "[HTTP::path]/"
}
}
You can modify the datagroup from Local Traffic ›› iRules ›› Data Group List menu. You can also use the following command.
tmsh
modify ltm data-group internal extensions records add { .abc .def .xyz }
07-Oct-2022 21:56
Hi Enes,
Thanks for responding, I will keep you update once we implement the irule.
Regards,
Ram