Forum Discussion
Stealth Redirection or URL Hiding
Understand that the [HTTP::uri] is going to produce a new URI that is transparent to the user. So if the user makes a request for "/news/foo/bar", the server will see "/foo/bar", and the client's address bar will not change. There is a minor typo in the above iRule though. It should actually look like this:
funny thing, everytime I add the line it apends a www.www.abc.com to the front of it..but I dont have a rule adding a www to my test virtual server
I tried to change this(HTTP::uri [string map {"/news" "/"} [HTTP::uri]]) where "/" is "/hi" and it doesnt work.
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/news*" {
pool news.xxx.com-pool
if { [string tolower [HTTP::uri] equals "/news" } {
HTTP::uri "/"
else {
HTTP::uri [string map {"/news" ""} [HTTP::uri]]
}
}
default {
pool www.abc.com-pool
}
}
}
The previous version would have mapped "/news/foo/bar" to "//foo/bar" (an extra forward slash).
everytime I add the line it apends a www.www.abc.com to the front of it
I'm not sure what this means.
Recent Discussions
Related Content
* 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