Aaron_Magruder_
Mar 30, 2005Nimbostratus
Removing / 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 / between ID=/29900 so the uri looks like /Templates/IQuote010.cfm?ID=29900.
/29900 (initial uri)
/Templates/IQuote010.cfm?ID=29900 (uri should look like this)
/Templates/IQuote010.cfm?ID=/29900 (need to remove the /)
when HTTP_REQUEST {
set uri [HTTP::uri]
set host [HTTP::host]
set new_uri /Templates/IQuote010.cfm?ID=
set new_url $host$new_uri$uri
if { [HTTP::uri] starts_with "/Templates" } {
use pool UITShared-172-29-98-77
}
else {
HTTP::redirect http://$new_url
}
}