Fixing app server SSL rewrite condition