Forum Discussion
Wil_Schultz_101
Nimbostratus
Oct 31, 2006Long URI's, part II
I had this thread awhile ago and figured it out on v4, how would I do the same on v9?Click here
else if (substr(http_uri, 0) > 255) {
redirect to "http://www.mysite.com" + substr(http_uri, 0, 254)
}
Thanks!
- hoolio
Cirrostratus
I don't think there is a 255 character limit on the URI in 9.x. Have you tested and found any issues?HTTP::redirect "http://www.mysite.com[HTTP::uri]"
- Wil_Schultz_101
Nimbostratus
We have had problems in the past with people sending repeated URL over 8000 chars in length, stuff seemed to slow down quite a bit. I'm porting over v4 iRules to v9 so I'd like to carry over everything and tune later.elseif { [substr [HTTP::uri] 0] > 513 } { HTTP::redirect "http://www.mysite.com" }
- hoolio
Cirrostratus
Were you seeing problems in 9.x with long URIs? If so what kind of problems? I've tested 1024 character URIs previously with 9.x and not found any issues.... elseif { [string length [HTTP::uri]] > 513 }{ HTTP::redirect "http://www.mysite.com" }
- Wil_Schultz_101
Nimbostratus
Right on, I could have sworn that I tried this exact syntax and did not see the results. Regardless, it is working now and I really appreciate the assistance. The exact syntax for the rule I have is:elseif { [string length [HTTP::uri]] > 513 }{ log local0.longuri redirect to http://www.mysite.com[substr [HTTP::uri] 0 513] }
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