just change in comments
use HTTP_HOST instead of REQUEST_URI for detecting web mode