Forum Discussion
Kai_Wilke
Dec 09, 2015MVP
HI Jason,
you may try this iRule to perform the redirect.
when HTTP_REQUEST {
if { ( [string tolower [HTTP::host]] equals "www.company.com" ) and
( [string tolower [HTTP::uri]] starts_with "/page/pagename" )
} then {
HTTP::redirect "https://www.company.com/pagename/"
}
}
BTW: Using a "start_with" operator to catch "/page/pagename" and also "/page/pagename/". But it will also cause "/page/pagename/foo" to become redirected. If this is not acceptable then change "starts_with" to "equals"^^
Cheers, Kai