Digging In To Apache’s Rewrite Module And Drupal November 13, 2013 in Development, Drupal 2 Comments on this post. sstedman79 Thank you for this! This is the only place I have seen this SetEnvIf technique applied to mitigate redirect loops caused by custom RewriteRules in Drupal’s .htaccess. This REDIRECT_MY_VAR pattern was exactly what I needed to apply https conditionally. This technique actually opens a path to providing an entirely Apache based recipe for implementing Secure Pages like functionality, without all of the bugs of that module in D7 and without needing to bootstrap Drupal to fire off redirects. sstedman79 Also, for case insensitive checking you can use SetEnvIfNoCase in place of SetEnvIf.