Forum Moderators: phranque
There is always a host.
RewriteCond %{HTTP_HOST} !^(www\.example\.com)?$ pattern is used (and it parses faster than two separate conditions). HTTP_HOST can match ONLY the requested host name and server port. It cannot see protocol, path or query string data.