Forum Discussion
Natthapon_Lohac
Nimbostratus
Feb 26, 2007Redirect to a different Web Page
I am trying to redirect any request that is made to a web page to a new page. I have written an iRule for this, it seems to work however, I receive error messages in the F5 Logs as follows:
And iRule that i have written is below: Please help to comments and troubleshoot.
when HTTP_REQUEST {
set curURI [HTTP::uri]
set newURIe "cnet/home1.asp"
set newURIt "cnet_t/home1.asp"
if {$curURI ends_with "cnet/home.asp"}{
log local0.notice "NewHome insert: [HTTP::host]/$newURIe"
HTTP::redirect "https://[HTTP::host]/cnet/home1.asp"
}
else
{
if {$curURI ends_with "cnet_t/home.asp"}{
log local0.notice "NewHome insert: [HTTP::host]/$newURIt"
HTTP::redirect "https://[HTTP::host]/cnet_t/home1.asp"
}
}
return
}
Thanks --> Natthapon
No RepliesBe the first to reply
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