Forum Discussion
Gajji
Cirrostratus
Aug 18, 2020URL redirection issue
we have configured Irule redirection From https://f5.com/uri1/uri2/uri3 to f5.com/urixyz but having issue with other url also .....redirection for other url also.. https://f5.com/u...
Dario_Garrido
Noctilucent
Aug 18, 2020Hello Gajji.
Try this.
if { [HTTP::uri] eq "https://f5.com/uri1/uri2/uri3" } {
HTTP::redirect "https://f5.com/urixyz"
}Regards,
Dario.
Gajji
Cirrostratus
Aug 18, 2020You mean to configure this way????
when HTTP_REQUEST {
if { ([HTTP::host] equals "f5.com") and ([HTTP::uri] eq "/uri1/uri2/uri3") } {
HTTP::redirect https://f5.com/ruixyz
- Dario_GarridoAug 18, 2020
Noctilucent
Actually it depends how your queries are conformed.
Let me explain it better.
[HTTP::uri] is equivalent to the second field in query method.
These are two examples of valid queries.
- GET /uri1/uri2/uri3 HTTP/1.1
- GET https://f5.com/uri1/uri2/uri3 HTTP/1.1
So, to match both cases, you could consider using this iRule:
if { [HTTP::path] starts_with "/uri1/uri2/uri3" } { HTTP::redirect "https://f5.com/urixyz" }Regards,
Dario.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
