Better RewriteRule check