Forum Moderators: phranque
You might want to add an exclusion to it, so that you can access the site by IP address from your own IP address by testing the %{REMOTE_ADDR} variable. This can be helpful if you suffer a DNS failure and need to view your site while the DNS-based world thinks it's off-line.
It's a good practice to redirect all domain aliases --including the IP address-- to the canonical domain right from the first day a site exists. This prevents all the endless canonicalization problems we see in the major SE forums right from the start.
Per our forum charter, take a shot at the code and we'll help you get it working.
Jim