Forum Discussion
dgeorgeson_2230
Nimbostratus
Jul 29, 2011Replacing the beginning of the URI if entire URI is not explicitly allowed
New to the forum and may have bitten off more than I can chew for a newbie.
I need to create an iRule that meets the following criteria:
if HOST = "www.domain.c...
The_Bhattman
Nimbostratus
Jul 29, 2011Hi Dgeorgeson,
I think the following untested iRule will be a bit more efficient
when HTTP_REQUEST {
set hostn [HTTP::host]
set basen [URI::basename[HTTP::uri]]
set uri [string tolower [HTTP::uri]]
if {($hostn eq "www.domain.com") and ( $uri starts_with "/subdirectory") } {
if { !(($basen eq "checkout.aspx" ) or ($basen eq "orderhistory.aspx")) } {
HTTP::uri "/newplace/$basen"
}
}
}
I hope this helps
Bhattman
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