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.
------------------------------