Apache 2.2 how to check if HTTP_HOST SERVER_ADDR are not equal?

349 views Asked by At

I have tried the below mentioned option but its not working. The condition passes when both are equal AND when both the values are not equal.

RewriteEngine on  
RewriteCond %{HTTP_HOST} !^%{SERVER_ADDR} 
RewriteRule ^(.*) http://hostIsDifferent [R=301,L]
0

There are 0 answers