Forum Discussion
irule redirect for 4 sites
Need some assistance setting up an iRule to redirect the following 4 sites:
Number 1:
http://ts1.domain.com/com/CollaborationCentral/PublishingImages/Test/OpexLogo.gif
redirect to:
https://site.domain.com/ep-common-components-stg/images/OpexLogo.gif
Number 2:
http://ts1.domain.com/com/CollaborationCentral/PublishingImages/Test/GreenBanner.jpg
redirect to:
https://site.domain.com/ep-common-components-stg/images/GreenBanner.jpg
Number 3:
http://ts1.domain.com/com/CollaborationCentral/PublishingImages/Test/Prop.jpg
redirect to:
https://site.domain.com/ep-common-components-stg/images/Prop.jpg
Number 4:
http://ts1.domain.com/com/CollaborationCentral/PublishingImages/Test/CompLogo.jpg
redirect to:
https://site.domain.com/ep-common-components-stg/images/CompLogo.jpg
- Samir_Jha_52506
Noctilucent
Confirm the source details, where you are trying to redirect or URI matching condition...
- Pete_Paiva_7147
Nimbostratus
In this case, I need both the URL and URI.
- Samir_Jha_52506
Noctilucent
Try below iRule. Hope it will work for your requirements.
when HTTP_REQUEST { if { [string tolower [HTTP::host]] equals "ts1.domain.com" } { switch [HTTP::uri] { "/com/collaborationcentral/publishingimages/test/opexlogo.gif" { HTTP::redirect "https://site.domain.com/ep-common-components-stg/images/OpexLogo.gif" } "/com/collaborationcentral/publishingimages/test/greenbanner.jpg" { HTTP::redirect "https://site.domain.com/ep-common-components-stg/images/GreenBanner.jpg" } "/com/collaborationcentral/publishingimages/test/prop.jpg" { HTTP::redirect "https://site.domain.com/ep-common-components-stg/images/Prop.jpg" } "/com/collaborationcentral/publishingimages/test/complogo.jpg" { HTTP::redirect "https://site.domain.com/ep-common-components-stg/images/CompLogo.jpg" } } } }
- Pete_Paiva_7147
Nimbostratus
I'll give it a test, thank you!!
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