Forum Moderators: phranque
I think that we probably need to see your code?
Important! THIS IS NOT RECOMMENDED. If you use a host name in a Deny rule in the .htaccess, Apache will convert your Apache log into host names instead of IP addresses. This will remove your ability to see the logs with IP addresses. You will want to use the IP address instead of host name; unless, you want to check your site access by host name alone.
If it makes a difference, you can usually find your Apache version by looking at headers or else in the host information in your control panel for some hosts.
Important! THIS IS NOT RECOMMENDED
My host does not use the traditional cpanel and does not reveal the Apache version anywhere I have yet been able to discover.
<IfModule mod_access.c>
SetEnv MOD_mod_access 1
</IfModule>
<IfModule mod_actions.c>
SetEnv MOD_mod_actions 1
</IfModule>
<IfModule mod_alias.c>
SetEnv MOD_mod_alias 1
</IfModule>
I've tried using HTTP_HOST under mod_rewrite...
HTTP_HOST is the host being requested, not the resolved host from which the user is visiting.
Just a thought... you could always do this in your app/script? But I guess you are trying to avoid this? To be honest, I always thought domain lookups are slow and best avoided in real time (would need to cache everything at the very least)? Is Apache OK with this?
HTTP_HOST is the host being requested, not the resolved host from which the user is visiting.
I always thought domain lookups are slow and best avoided in real time
you want %{REMOTE_HOST}. (Otherwise known as "the IP"
(same as REMOTE_ADDR)
Regardless of the setting, when mod_authz_host is used for controlling access by hostname, a double reverse lookup will be performed. Note that the result of this double-reverse isn't generally available unless you set HostnameLookups Double.
DNS lookups can take considerable amounts of time
The utility logresolve