How can you use ModRewrite to check if a cache file exists, and if it does, rewrite to the cache file and otherwise rewrite to a dynamic file.
For example I have th
Another approach would be to first look if there is a chached representation available:
RewriteCond %{DOCUMENT_ROOT}/cache/$0 -f RewriteRule ^pages/[^/\.]+$ cache/$0.html [L,QSA] RewriteRule ^pages/([^/\.]+)$ pages.php?p=$1 [L,QSA]