Forum Discussion
Help Please
It's important to understand that a URI will always exist, even if it's just "/". So the simplest approach may simply be to change the URI:
when HTTP_REQUEST {
HTTP::uri "/"
}
This will change the URI transparently (the client won't see the change). If you do actually want the client to see the change, then something like this:
when HTTP_REQUEST {
if { not ( [HTTP::uri] equals "/" ) } {
HTTP::redirect "/"
}
}
Be forewarned though that both methods can have consequences. If the application isn't designed to handle these changes, or perhaps the application has other URIs that shouldn't be rewritten, then the iRule could get a bit more complex. If you just want to hide the "/1234.aspx" URI from the client, that may not be easy. What if other URIs exists (ex. /5678.aspx, /images/mycat.png, etc.)? You have to have a way for the client to indicate what it wants.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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