Forum Discussion
Eric_Brander_27
Sep 09, 2011Nimbostratus
Having trouble what what should be a "basic" URI rewrite
This should be simple but I can't figure it out.
I want any request directly to "https://www.abc.com/" to redirect to "https://www.abc.com/pathto/portalapplication/"
In several hours of research I came up with this:
when HTTP_REQUEST {
if { [HTTP::uri] equals "/" }
{HTTP::uri {/pathto/portalapplication/}
}
}
Which doesn't seem to work. Can you offer any suggestions?
TIA,
Eric
- nitassEmployee
[root@Edelweiss:Active] config b virtual bar list virtual bar { destination 172.28.17.17:https ip protocol tcp rules myrule profiles { clientssl { clientside } http {} tcp {} } } [root@Edelweiss:Active] config b rule myrule list rule myrule { when HTTP_REQUEST { if {[HTTP::uri] equals "/"} { HTTP::redirect https://[HTTP::host]/pathto/portalapplication/ } } } [root@Edelweiss:Active] config curl -Ik https://www.abc.com HTTP/1.0 302 Found Location: https://www.abc.com/pathto/portalapplication/ Server: BigIP Connection: Keep-Alive Content-Length: 0
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