Forum Discussion
Hai_Le_36697
Nimbostratus
Jan 20, 2009Non-cached redirects
Hello,
I would like to know if anyone can please help me with this problem. Basically what I am trying to do is to write an iRule that will redirect a user to the homepage but NOT have that redirect cached.
Here's my problem. We have a bunch of categories on our site and they get published and non-published constantly. The problem is when the category is not there, it gets redirected correctly, however if that category is then published, users are still getting redirected according to the iRule.
Our application throws an error page when a page cannot be found or an application error occurs. Our web developers have added to that page a header called "X-Test-Cache-Control" and put in the value "DO-NOT-CACHE" whenever that page is served. My task is to redirect users to the homepage if that page is served BUT not to cache that redirect.
Here's my iRule so far:
when HTTP_RESPONSE {
if {([HTTP::header X-Test-Cache-Control] eq "DO-NOT-CACHE")} {
HTTP::redirect "http://www.siteA.com"
}
}
So if I go to http://www.siteA.com/categorytest.htm I will get redirected www.siteA.com if categorytest.htm does not exist. The problem is that if categorytest.htm is there, I will still redirected to www.siteA.com. I would like to know if there is a way I can proxy the redirect to the homepage.
Thank you!
- Hai_Le_36697
Nimbostratus
I think I made my problem more confusing then it should be...
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