This doesn't seem to be working for me (it is always blank). Should it work? Any suggestions?
RewriteCond %{ENV:CACHE_CONTROL} no-cache [NC]
RewriteRule . %{REQUEST_URI}?recache [L]
Logfile always shows:
[REWRITE] Cond: Match '' with pattern 'no-cache', result: -1
Safari dev console shows headers sent:
Accept:application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Cache-Control:no-cache
Pragma:no-cache
Referer:http://localhost:3001/poems
User-Agent:Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; en-us) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4
ALSO
I was hoping to add cache-control headers via rewrite, but they don't seem to be added to the response headers.
RewriteRule ^/login/js - [L,E=Cache-Control:max-age=0]
But headers still don't show a cache-control setting:
Accept-Ranges:bytes
Content-Encoding:gzip
Content-Length:4730
Content-Type:text/html
Date:Sun, 30 Jan 2011 03:29:52 GMT
ETag:"44a6-4d3dad06-12f451f"
Last-Modified:Mon, 24 Jan 2011 16:47:02 GMT
Server:LiteSpeed
Vary:Accept-Encoding
2011-01-29 19:29:52.128 INFO [127.0.0.1:50046-0#ap] [REWRITE] Rule: Match '/login/js/kevin.html' with pattern '^([^.]+)$', result: -1
2011-01-29 19:29:52.128 INFO [127.0.0.1:50046-0#ap] [REWRITE] Rule: Match '/login/js/kevin.html' with pattern '^(.*)$', result: 2
2011-01-29 19:29:52.128 INFO [127.0.0.1:50046-0#ap] [REWRITE] Cond: Match '/login/js/kevin.html' with pattern '-adult', result: -1
2011-01-29 19:29:52.128 INFO [127.0.0.1:50046-0#ap] [REWRITE] Rule: Match '/login/js/kevin.html' with pattern '^/login/js', result: 1
2011-01-29 19:29:52.128 INFO [127.0.0.1:50046-0#ap] [REWRITE] add ENV: 'Cache-Control:max-age=0'
2011-01-29 19:29:52.128 INFO [127.0.0.1:50046-0#ap] [REWRITE] No substition
2011-01-29 19:29:52.128 INFO [127.0.0.1:50046-0#ap] [REWRITE] Last Rule, stop!
Thanks!
RewriteCond %{ENV:CACHE_CONTROL} no-cache [NC]
RewriteRule . %{REQUEST_URI}?recache [L]
Logfile always shows:
[REWRITE] Cond: Match '' with pattern 'no-cache', result: -1
Safari dev console shows headers sent:
Accept:application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Cache-Control:no-cache
Pragma:no-cache
Referer:http://localhost:3001/poems
User-Agent:Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; en-us) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4
ALSO
I was hoping to add cache-control headers via rewrite, but they don't seem to be added to the response headers.
RewriteRule ^/login/js - [L,E=Cache-Control:max-age=0]
But headers still don't show a cache-control setting:
Accept-Ranges:bytes
Content-Encoding:gzip
Content-Length:4730
Content-Type:text/html
Date:Sun, 30 Jan 2011 03:29:52 GMT
ETag:"44a6-4d3dad06-12f451f"
Last-Modified:Mon, 24 Jan 2011 16:47:02 GMT
Server:LiteSpeed
Vary:Accept-Encoding
2011-01-29 19:29:52.128 INFO [127.0.0.1:50046-0#ap] [REWRITE] Rule: Match '/login/js/kevin.html' with pattern '^([^.]+)$', result: -1
2011-01-29 19:29:52.128 INFO [127.0.0.1:50046-0#ap] [REWRITE] Rule: Match '/login/js/kevin.html' with pattern '^(.*)$', result: 2
2011-01-29 19:29:52.128 INFO [127.0.0.1:50046-0#ap] [REWRITE] Cond: Match '/login/js/kevin.html' with pattern '-adult', result: -1
2011-01-29 19:29:52.128 INFO [127.0.0.1:50046-0#ap] [REWRITE] Rule: Match '/login/js/kevin.html' with pattern '^/login/js', result: 1
2011-01-29 19:29:52.128 INFO [127.0.0.1:50046-0#ap] [REWRITE] add ENV: 'Cache-Control:max-age=0'
2011-01-29 19:29:52.128 INFO [127.0.0.1:50046-0#ap] [REWRITE] No substition
2011-01-29 19:29:52.128 INFO [127.0.0.1:50046-0#ap] [REWRITE] Last Rule, stop!
Thanks!
Last edited by a moderator: