not sure if i understand correctly. is it something like this?
config
[root@ve11a:Active:In Sync] config tmsh list ltm rule qux
ltm rule qux {
when RULE_INIT {
set static::uri "/ThisFolderPath/v1"
}
when HTTP_REQUEST {
if { [string match -nocase $static::uri [HTTP::uri]] } {
if { [HTTP::uri] ne $static::uri } {
HTTP::redirect "http://mysite.com${static::uri}"
}
}
}
}
test
[root@ve11a:Active:In Sync] config curl -I http://172.28.24.10/thisfolderpath/v1
HTTP/1.0 302 Found
Location: http://mysite.com/ThisFolderPath/v1
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
[root@ve11a:Active:In Sync] config curl -I http://172.28.24.10/THISfolderpath/v1
HTTP/1.0 302 Found
Location: http://mysite.com/ThisFolderPath/v1
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
[root@ve11a:Active:In Sync] config curl -I http://172.28.24.10/ThisFolderPath/v1
HTTP/1.1 404 Not Found
Date: Fri, 05 Sep 2014 14:53:01 GMT
Server: Apache/2.2.3 (CentOS)
Last-Modified: Sun, 09 Feb 2014 08:39:51 GMT
ETag: "41879c-59-2a9c23c0"
Accept-Ranges: bytes
Content-Length: 89
Content-Type: text/html; charset=UTF-8