Forum Discussion
Stephen_Yip_879
Nimbostratus
Nov 24, 2014Help with iRule creation
Hi,
I needed to create an iRule to do the following,
Original URL
http://analytics2.jobshop.ca/InformationSystems/SER
Redirect to
http://analytics2.jobshop.ca/Reports/Pages/R...
Gilles_Archer_3
Nimbostratus
Nov 24, 2014Stephen,
Try this:
when HTTP_REQUEST {
if {[HTTP::path] starts_with "/InformationSystems/SER"} {
HTTP::redirect "http://[HTTP::host]/Reports/Pages/Reports/InformationSystems/"
}
}
- Brad_ParkerNov 24, 2014
Cirrus
I would tweak this to take out case sensitivity as technically urls should be all lower case and some web servers handle case differently. when HTTP_REQUEST { if {[string tolower [HTTP::host]] starts_with "/informationsystems/ser"} { HTTP::redirect "http://[HTTP::host]/Reports/Pages/Reports/InformationSystems/" } }
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