The basic way to do this is use NamedBased virtual hosting.
The first vhost is the default, which is your page you want to land if nothing matches.
All the other vhosts are your domain names. It will only use that if it matches ServerName or SererAlias matches the name in the URL, so a URL with an IP will take the default.zs
The other way to do this is to use RewriteCond and match any host with anything that looks like an ip and redirect to the page using a RewriteRule.
The first method is more generic because it matches anything that doesn't have a VirtualHost. I guess the second minimizes the changes but you have to write a Regular expression to match an ip but most hosts don't start with a number so you don't have to do an exact match.
|