RewriteEngine on
RewriteCond %{REQUEST_URI} !/browser_not_supported/
RewriteCond %{HTTP_USER_AGENT} ^Mozilla/4\.0\s*\(compatible;\s*MSIE\s*(1|2|3|4|5|6|7|8)\.(?!.*IEMobile)
RewriteRule (.*) /browser_not_supported/index.html [R=302,L]
Both work fine by themselves. Unfortunately, the 302 redirect generated
by the rewrite rule also gets Cache-Control and Expires headers like this:
< Cache-Control: max-age=86400
< Expires: Thu, 23 May 2013 11:03:00 GMT
This makes some proxies cache the redirect. When the user then starts
her supported browser and connects to the site again, the proxy will
serve her the same redirect again and thus redirect the supported
browser to the browser-not-supported page as well.
Is mod_expires supposed to work in conjunction with mod_headers?