Forum Discussion
HTTP redirect intermittently working
Have been having an issue recently with HTTP redirect irules where they randomly stop working and show "page cannot be displayed", if you refresh a couple times the page will redirect. I am currently on version 9.3.1 LTM, upgrading soon but not yet. Here is a sample of a redirect that will randomly work.
when HTTP_REQUEST { if { [HTTP::uri] equals "/jazz" }{ HTTP::redirect http://myurl.com/default.aspx?pageid=160 } }
This has been verified on several ISP's and browsers.
4 Replies
- Kevin_Stewart
Employee
Any chance that the request URI doesn't exactly equals "/jazz" - different case, additional content/query string added? Something like this would catch these two cases:
when HTTP_REQUEST { if { [string tolower [HTTP::uri]] starts_with "/jazz" } { HTTP::redirect "http://myurl.com/default.aspx?pagedid=160" } } - lisa_56349
Nimbostratus
I can reproduce this issue using lowercase, so forcing the code to use lowercase did not resolve the issue of it intermittently working. Thanks though...
- Kevin_Stewart
Employee
I'd probably recommend some logging as a next step then:
when HTTP_REQUEST { log local0. "Requested: -[HTTP::uri]-" if { [HTTP::uri] equals "/jazz" } { log local0. "Redirecting" HTTP::redirect "http://myurl.com/default.aspx?pagedid=160" } }Then look for "Redirecting" in the logs and the URI value right before it.
do you really not get redirected or does reaching the redirected page fail? if it is the first (check with some http browser plugin) then start tcpdump on the big-ip to check if the redirect isn't send.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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