F5 iRule: Remove 'test' from URIs under /test/
To remove 'test' from URIs under the '/test/' path, you can use the following iRule:
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/test/" } {
set uri [string range [HTTP::uri] 6 end]
HTTP::uri $uri
}
}
This iRule first checks if the HTTP request URI starts with '/test/'. If it does, it uses the string range function to extract the portion of the URI from the 6th character to the end. It then sets the extracted URI as the new URI using the HTTP::uri command. This effectively removes 'test' from the URI under '/test/'.
原文地址: https://www.cveoy.top/t/topic/peIF 著作权归作者所有。请勿转载和采集!