Forum Discussion
Aaron_Magruder_
Nimbostratus
Mar 30, 2005Removing / inserted by iRule variable
Is there a way to prevent the / from being inserted when using variables? The following iRule works to redirect users from /29900 to /Templates/IQuote010.cfm?ID=/29900. I need a way to remove the / ...
JRahm
Admin
Mar 31, 2005Would this work? Sorry, I don't have a pair with which to test right now, F5 pried our evaluation units out of our hands last Friday. Hopefully a PO will be cut soon.
when HTTP_REQUEST {
set uri { string trimleft [http::uri] "/" }
set uri_length { string length $uri }
set host [HTTP::host]
set new_uri /Templates/IQuote010.cfm?ID=
set new_url $host$new_uri$uri
if { $uri_length = 5 } {
HTTP::redirect http://$new_url
log "Redirecting [IP::client_addr] to http://$new_url"
}
else {
use pool UITShared-172-29-98-77
}
}
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