
01-12-2011, 01:36 AM
|
|
LiteSpeed Staff
|
|
Join Date: Sep 2009
Posts: 2,226
|
|
1.
it's possible to cache dynamic page(for example php) at server and each vhost level, without using rewriterule. This thread is talking about cache with rewriterule, which is litespeed specific feature and very useful in practice.
2. cache the original URI -- i.e., the URL in browser's address.
if "Cache Request with Query String"=Yes, then will cache page "index.php?page=variable"; otherwise won't cache it.
the rewriterule
Code:
RewriteRule /index.php - [E=Cache-Control:max-age=600]
won't cache "index.php/variable", since it's a different URI.
however, if the rewrite rule is
Code:
RewriteRule /index.php(/.*)? - [E=Cache-Control:max-age=600]
then both /index.php and /index.php/variable will be cached, since both matches the cache condition.
3.right, need set "Cache Request with Cookie"=Yes
4."how do you only cache guest/visitors without cookie"
Code:
RewriteCond %{HTTP_COOKIE} ^$
RewriteRule /index.php - [E=Cache-Control:max-age=600]
|