Hi there,
It turns out that having only R, instead of R=301 or R=302 will prevent the redirection being cached in the browser.
This works for me,
RewriteRule ^/{SomePattern}$ /{URL} [R]
Although I did create an environment variable, and added header options,
SetEnv OpenURL /URL1
SetEnv CloseURL /URL2
Header always set Cache-Control "no-store, no-cache, must-revalidate" env=OpenURL
Header always set Cache-Control "max-age=60" env=CloseURL
But I think the [R] redirection flag alone should be sufficient.
------------------------------
Senen Jr Dimanahan
------------------------------
Original Message:
Sent: Wed April 14, 2021 03:26 AM
From: Carlos García B.
Subject: IBM HTTP Server/Apache - RedirectRule & URL Cache &
Hello,
30x errors are almost always cached by the browser. Apache httpd / IHS by itself does not cache anything (except if you do include a cache module and configure it)
You might try forcing a redirect with a Cache-control header with no-store value to avoid it being cached, but I have not tested it. To achieve that you would need to set an environmental variable in the RewriteRule and use mod_headers to return the header I mentioned based on the presence of that environmental.
------------------------------
Carlos G.B.
Original Message:
Sent: Tue April 13, 2021 08:49 PM
From: Senen Jr Dimanahan
Subject: IBM HTTP Server/Apache - RedirectRule & URL Cache &
Hi all
I have two J2EE apps running in WAS, and hosted by IHS in front.
For the longest time, my RewriteRule (in IHS virtualhost stanza) is pointed to the first app https://hostalias.domain/app1url. When I change the rewriterule to https://hostalias.domain/app2url and restarted apache, i'm still redirected to https://hostalias.domain/app1url.
I have to clear my web browser's cache first in order for the redirection to app2url take effect.
Is there a URL caching in IHS layer? I'm thinking if there's such a way to clear it so I don't have to manually clear in my browser.
Hope someone can help me on this.
Thanks a lot for the time!
------------------------------
Senen Jr Dimanahan
------------------------------