Forum Discussion
Spence_Faschin1
Nimbostratus
Mar 15, 2005Rewrite a uri (not redirect)
I have a need to rewrite a uri, and make this look transparent to the end user. What I have come up with is this:
when HTTP_REQUEST {
set loop 0
set max [llength $::shortur...
Spence_Faschin1
Nimbostratus
Mar 21, 2005Just an update - here is the final rule that I ended up going with:
Assuming I have a data group called uris formated like this:
/uri1 /longuri/directoryone
/uri2 /longuri/directorytwo
/uri3 /longuri/someotherdirectory
when HTTP_REQUEST {
if { [getfield /[findclass [findstr [http_uri] "" 1 "/"] $::uris] " " 1] ne ""}{
HTTP::uri "[findclass /[findstr [http_uri] "" 1 "/"] $::uris " " ][HTTP::uri]"
}
}
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