more efficient rewriteCond
correct cache pattern