Forum Discussion
Pandiarajan_701
Jun 26, 2012Nimbostratus
Irule Redirection
Dears,
I need to redirect an URL
www.bana.com/stp/* >>> www.gamil.com/*
We need to change the HTTP Host from "bana.com" to "gamil.com" and rem...
Pandiarajan_701
Jun 27, 2012Nimbostratus
Hi Aaron,
Thanks for the reply.
I have modified ur irule as below.
when HTTP_REQUEST {
if {[string tolower [HTTP::host][HTTP::uri]] starts_with "www.bana.com/stp/"}{
log local0. "[IP::client_addr]:[TCP::client_port]: Redirecting request to http://gamil.com[string range 4 end [HTTP::uri]]"
HTTP::redirect "http://gamil.com[string range 4 end [HTTP::uri]"
pool STP_Pool
}
}
I am getting the parse error as shown below
[iRuler_Parse_Test_Rule] error: line 4: [parse error: missing close-bracket] [[string range 4 end[HTTP::uri]" pool STP_Pool ]
Rule [iRuler_Parse_Test_Rule] error: line 4: [parse error: missing "] ["http://gamil.com [string range 4 end[HTTP::uri]"] pool STP_Pool ]
Please check this and advise.
Waiting for your reply.
Thanks in advance.
Regards,
Pandiarajan
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